kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkr...@apache.org
Subject svn commit: r1575375 - /kafka/site/081/ops.html
Date Fri, 07 Mar 2014 19:07:45 GMT
Author: jkreps
Date: Fri Mar  7 19:07:45 2014
New Revision: 1575375

URL: http://svn.apache.org/r1575375
Log:
Improve line wrapping for commands.

Modified:
    kafka/site/081/ops.html

Modified: kafka/site/081/ops.html
URL: http://svn.apache.org/viewvc/kafka/site/081/ops.html?rev=1575375&r1=1575374&r2=1575375&view=diff
==============================================================================
--- kafka/site/081/ops.html (original)
+++ kafka/site/081/ops.html Fri Mar  7 19:07:45 2014
@@ -10,7 +10,8 @@ You have the option of either adding top
 <p>
 Topics are added and modified using the topic tool:
 <pre>
- &gt; bin/kafka-topics.sh --zookeeper zk_host:port/chroot --create --topic my_topic_name
--partitions 20 --replication-factor 3 --config x=y
+ &gt; bin/kafka-topics.sh --zookeeper zk_host:port/chroot --create --topic my_topic_name

+       --partitions 20 --replication-factor 3 --config x=y
 </pre>
 The replication factor controls how many servers will replicate each message that is written.
If you have a replication factor of 3 then up to 2 servers can fail before you will lose access
to your data. We recommend you use a replication factor of 2 or 3 so that you can transparently
bounce machines without interrupting data consumption.
 <p>
@@ -24,7 +25,8 @@ You can change the configuration or part
 <p>
 To add partitions you can do
 <pre>
- &gt; bin/kafka-topics.sh --zookeeper zk_host:port/chroot --alter --topic my_topic_name
--partitions 40 
+ &gt; bin/kafka-topics.sh --zookeeper zk_host:port/chroot --alter --topic my_topic_name

+       --partitions 40 
 </pre>
 Be aware that one use case for partitions is to semantically partition data, and adding partitions
doesn't change the partitioning of existing data so this may disturb consumers if they rely
on that partition. That is if data is partitioned by <code>hash(key) % number_of_partitions</code>
then this partitioning will potentially be shuffled by adding partitions but Kafka will not
attempt to automatically redistribute data in any way.
 <p>
@@ -89,7 +91,9 @@ The source and destination clusters are 
 <p>
 Here is an example showing how to mirror a single topic (named <i>my-topic</i>)
from two input clusters:
 <pre>
- &gt; bin/kafka-run-class.sh kafka.tools.MirrorMaker --zookeeper zk_host:port/chroot
--consumer.config consumer-1.properties --consumer.config consumer-2.properties --producer.config
producer.properties --whitelist my-topic
+ &gt; bin/kafka-run-class.sh kafka.tools.MirrorMaker --zookeeper zk_host:port/chroot

+       --consumer.config consumer-1.properties --consumer.config consumer-2.properties 
+       --producer.config producer.properties --whitelist my-topic
 </pre>
 Note that we specify the list of topics with the <code>--whitelist</code> option.
This option allows any regular expression using <a href="http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html">Java-style
regular expressions</a>. So you could mirror two topics named <i>A</i> and
<i>B</i> using <code>--whitelist 'A|B'</code>. Or you could mirror
<i>all</i> topics using <code>--whitelist '*'</code>. Make sure to
quote any regular expression to ensure the shell doesn't try to expand it as a file path.
For convenience we allow the use of ',' instead of '|' to specify a list of topics.
 <p>



Mime
View raw message