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

    https://github.com/apache/spark/pull/3026#discussion_r19694604
  
    --- Diff: 
streaming/src/main/scala/org/apache/spark/streaming/scheduler/ReceiverTracker.scala
 ---
    @@ -84,28 +90,35 @@ class ReceiverTracker(ssc: StreamingContext) extends 
Logging {
       def stop() = synchronized {
         if (!receiverInputStreams.isEmpty && actor != null) {
           // First, stop the receivers
    -      receiverExecutor.stop()
    +      if (!skipReceiverLaunch) receiverExecutor.stop()
     
           // Finally, stop the actor
           ssc.env.actorSystem.stop(actor)
           actor = null
    +      receivedBlockTracker.stop()
           logInfo("ReceiverTracker stopped")
         }
       }
     
    -  /** Return all the blocks received from a receiver. */
    -  def getReceivedBlockInfo(streamId: Int): Array[ReceivedBlockInfo] = {
    -    val receivedBlockInfo = 
getReceivedBlockInfoQueue(streamId).dequeueAll(x => true)
    -    logInfo("Stream " + streamId + " received " + receivedBlockInfo.size + 
" blocks")
    -    receivedBlockInfo.toArray
    +  /** Allocate all unallocated blocks to the given batch. */
    +  def allocateBlocksToBatch(batchTime: Time): Unit = {
    +    if (receiverInputStreams.nonEmpty) {
    +      receivedBlockTracker.allocateBlocksToBatch(batchTime)
    +    }
       }
     
    -  private def getReceivedBlockInfoQueue(streamId: Int) = {
    -    receivedBlockInfo.getOrElseUpdate(streamId, new 
SynchronizedQueue[ReceivedBlockInfo])
    +  /** Get all the block for batch time . */
    --- End diff --
    
    Fixed.


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