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

    https://github.com/apache/spark/pull/1195#discussion_r15494801
  
    --- Diff: 
streaming/src/main/scala/org/apache/spark/streaming/receiver/ReceiverSupervisorImpl.scala
 ---
    @@ -108,11 +106,23 @@ private[streaming] class ReceiverSupervisorImpl(
           optionalMetadata: Option[Any],
           optionalBlockId: Option[StreamBlockId]
         ) {
    +    pushArrayBuffer(arrayBuffer, optionalMetadata, optionalBlockId, None)
    +  }
    +
    +
    +  /** Store an ArrayBuffer of received data as a data block into Spark's 
memory. */
    +  override def pushArrayBuffer(
    +      arrayBuffer: ArrayBuffer[_],
    +      optionalMetadata: Option[Any],
    +      optionalBlockId: Option[StreamBlockId],
    +      optionalCallback: Option[() => Unit]
    +    ) {
         val blockId = optionalBlockId.getOrElse(nextBlockId)
         val time = System.currentTimeMillis
         blockManager.putArray(blockId, arrayBuffer.toArray[Any], storageLevel, 
tellMaster = true)
         logDebug("Pushed block " + blockId + " in " + 
(System.currentTimeMillis - time)  + " ms")
         reportPushedBlock(blockId, arrayBuffer.size, optionalMetadata)
    +    callback(optionalCallback)
    --- End diff --
    
    Makes sense. We should probably move it out to a separate thread. Will 
update this.


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