Github user jerryshao commented on a diff in the pull request:
https://github.com/apache/spark/pull/1291#discussion_r14498076
--- 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 --
Hi @guowei2 , two quick questions:
1. Is there any situation where partitions will be 0?
2. I don't think `numPartitions` can be set to 0, since HashPartitioner
will be failed if `Mod 0`.
---
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.
---