Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1291#discussion_r14544371
  
    --- Diff: 
streaming/src/main/scala/org/apache/spark/streaming/dstream/ShuffledDStream.scala
 ---
    @@ -39,8 +39,10 @@ class ShuffledDStream[K: ClassTag, V: ClassTag, C: 
ClassTag](
     
       override def compute(validTime: Time): Option[RDD[(K,C)]] = {
         parent.getOrCompute(validTime) match {
    -      case Some(rdd) => Some(rdd.combineByKey[C](
    -          createCombiner, mergeValue, mergeCombiner, partitioner, 
mapSideCombine))
    +      case Some(rdd) => {
    +        Some(if (rdd.partitions.length==0) 
rdd.combineByKey(createCombiner, mergeValue, mergeCombiner,0)
    --- End diff --
    
    I agree with @jerryshao , if numPartitioner is set to 0, then partitioning 
will fail as partitions are calculated by doing (hashcode % numPartitions) and 
anything % 0  gives "java.lang.ArithmeticException: / by zero" error.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to