Github user guowei2 commented on a diff in the pull request:
https://github.com/apache/spark/pull/1291#discussion_r14498644
--- 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 --
1ãfor example:
u use NetworkInputDStream to receive data to generate BlockRDD. when it
receive no blocks in validtime, then partitions will be 0
NetworkInputDStream's code here
override def compute(validTime: Time): Option[RDD[T]] = {
// If this is called for any time before the start time of the context,
// then this returns an empty RDD. This may happen when recovering from
a
// master failure
if (validTime >= graph.startTime) {
val blockIds = ssc.scheduler.networkInputTracker.getBlockIds(id,
validTime)
Some(new BlockRDD[T](ssc.sc, blockIds))
} else {
Some(new BlockRDD[T](ssc.sc, Array[BlockId]()))
}
}
2. when parent RDD partition num is 0 ,but ShuffledDStream also change
into muti-partitions ,
then emtpy job will be running.
what i do is when this happen ShuffledDStream also out 0 partition
---
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.
---