<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Kafka Partitioning Class : Clarification in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kafka-Partitioning-Class-Clarification/m-p/95540#M8890</link>
    <description>&lt;P&gt;We create Kafka Partition using kafka-topics.sh.  Would like to validate my understanding is correct.
Partitioning strategy is actually performed by Kafka rather than Producer.
As per &lt;A href="http://kafka.apache.org/07/configuration.html" target="_blank"&gt;http://kafka.apache.org/07/configuration.html&lt;/A&gt; (Important configuration properties for Kafka broker:)
producer.DefaultPartitioner&amp;lt;T&amp;gt; - uses the partitioning strategy hash(key)%num_partitions. If key is null, 
then it picks a random partition.
Producer would either pass a key or not which is then used by Kafka Broker to determine partition strategy 
whether to use Hash Partitioning or Random Key.&lt;/P&gt;</description>
    <pubDate>Fri, 16 Oct 2015 17:20:51 GMT</pubDate>
    <dc:creator>Jagatheeshr</dc:creator>
    <dc:date>2015-10-16T17:20:51Z</dc:date>
    <item>
      <title>Kafka Partitioning Class : Clarification</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kafka-Partitioning-Class-Clarification/m-p/95540#M8890</link>
      <description>&lt;P&gt;We create Kafka Partition using kafka-topics.sh.  Would like to validate my understanding is correct.
Partitioning strategy is actually performed by Kafka rather than Producer.
As per &lt;A href="http://kafka.apache.org/07/configuration.html" target="_blank"&gt;http://kafka.apache.org/07/configuration.html&lt;/A&gt; (Important configuration properties for Kafka broker:)
producer.DefaultPartitioner&amp;lt;T&amp;gt; - uses the partitioning strategy hash(key)%num_partitions. If key is null, 
then it picks a random partition.
Producer would either pass a key or not which is then used by Kafka Broker to determine partition strategy 
whether to use Hash Partitioning or Random Key.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2015 17:20:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kafka-Partitioning-Class-Clarification/m-p/95540#M8890</guid>
      <dc:creator>Jagatheeshr</dc:creator>
      <dc:date>2015-10-16T17:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka Partitioning Class : Clarification</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kafka-Partitioning-Class-Clarification/m-p/95541#M8891</link>
      <description>&lt;P&gt;This is old config file &lt;A href="http://kafka.apache.org/07/configuration.html" target="_blank"&gt;http://kafka.apache.org/07/configuration.html&lt;/A&gt; version 0.7 &lt;/P&gt;&lt;P&gt;for the new configuration you should look at &lt;A href="https://kafka.apache.org/08/configuration.html" target="_blank"&gt;https://kafka.apache.org/08/configuration.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;By using kafka-topics.sh you create how many partitions you would like to have in a topic. Usually this should be determined by how much parallelism you would like to have on the consumer side to read from the topic.&lt;/P&gt;&lt;P&gt;Kafka doesn't determine how you distribute the data into the topic partitions. That depends on the producer. As you said if key is null it does a round-robin not random. If the key is provided it does a hash based distribution. All of this happens on the producer side not in kafka broker. &lt;/P&gt;</description>
      <pubDate>Sun, 18 Oct 2015 00:10:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kafka-Partitioning-Class-Clarification/m-p/95541#M8891</guid>
      <dc:creator>schintalapani</dc:creator>
      <dc:date>2015-10-18T00:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: Kafka Partitioning Class : Clarification</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kafka-Partitioning-Class-Clarification/m-p/95542#M8892</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/172/schintalapani.html" nodeid="172"&gt;@schintalapani@hortonworks.com&lt;/A&gt;. So i see this as  a change in the way kafka works from .7 to .8 .&lt;/P&gt;</description>
      <pubDate>Sun, 18 Oct 2015 04:51:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Kafka-Partitioning-Class-Clarification/m-p/95542#M8892</guid>
      <dc:creator>Jagatheeshr</dc:creator>
      <dc:date>2015-10-18T04:51:09Z</dc:date>
    </item>
  </channel>
</rss>

