title: Number Of Parallel Task in Spark Streaming and Kafka Integration
body: <p>I am very new to Spark Streaming.I  have some basic doubts..Can some one please help me to clarify this:</p>
  <ol>
  <li><p>My message size is standard.1Kb each message.</p>
  </li>
  <li><p>Number of Topic partitions is 30 and using dstream approach to consume message from kafka.</p>
  </li>
  <li><p>Number of cores given to spark job as :</p>
  <p>( spark.max.cores=6| spark.executor.cores=2)</p>
  </li>
  <li><p>As I understand that Number of Kafka Partitions=Number of RDD partitions:</p>
  <pre><code> In this case dstream approach:
  
   dstream.forEachRdd(rdd-&gt;{
   rdd.forEachPartition{
   }
  
    **Question**:This loop forEachPartiton will execute 30 times??As there are 30 Kafka partitions
  </code></pre>
  <p>}</p>
  </li>
  <li><p>Also  since I have given 6 cores,How many partitions will be consumed in parallel from kafka</p>
  <p><strong>Questions:</strong> Is it 6 partitions at a time
  or<br />
  30/6 =5 partitions at a time?
  Can some one please give little detail on it on how this exactly work in dstream approach.</p>
  </li>
  </ol>