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

    https://github.com/apache/spark/pull/3026#discussion_r19694824
  
    --- Diff: 
streaming/src/main/scala/org/apache/spark/streaming/dstream/ReceiverInputDStream.scala
 ---
    @@ -60,22 +56,35 @@ abstract class ReceiverInputDStream[T: 
ClassTag](@transient ssc_ : StreamingCont
     
       /** Ask ReceiverInputTracker for received data blocks and generates RDDs 
with them. */
       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 blockInfo = 
ssc.scheduler.receiverTracker.getReceivedBlockInfo(id)
    -      receivedBlockInfo(validTime) = blockInfo
    -      val blockIds = blockInfo.map { 
_.blockStoreResult.blockId.asInstanceOf[BlockId] }
    -      Some(new BlockRDD[T](ssc.sc, blockIds))
    -    } else {
    -      Some(new BlockRDD[T](ssc.sc, Array.empty))
    +    val blockRDD = {
    +      if (validTime >= graph.startTime) {
    +        val blockStoreResults = getReceivedBlockInfo(validTime).map { 
_.blockStoreResult }
    +        val blockIds = blockStoreResults.map { 
_.blockId.asInstanceOf[BlockId] }.toArray
    +        val isWriteAheadLogBased = blockStoreResults.forall {
    --- End diff --
    
    Is it the case that either _all_ `blockStoreResults` are WAL results or 
none are?  Maybe we can add a stronger assertion here.


---
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.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to