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

    https://github.com/apache/spark/pull/5908#discussion_r30576683
  
    --- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala 
---
    @@ -485,14 +486,15 @@ private[spark] class BlockManager(
             if (level.useOffHeap) {
               logDebug(s"Getting block $blockId from ExternalBlockStore")
               if (externalBlockStore.contains(blockId)) {
    -            externalBlockStore.getBytes(blockId) match {
    -              case Some(bytes) =>
    -                if (!asBlockResult) {
    -                  return Some(bytes)
    -                } else {
    -                  return Some(new BlockResult(
    -                    dataDeserialize(blockId, bytes), 
DataReadMethod.Memory, info.size))
    -                }
    +            val result = if (asBlockResult) {
    +              externalBlockStore.getValues(blockId)
    +                .map(new BlockResult(_, DataReadMethod.Memory, info.size))
    +            } else {
    +              externalBlockStore.getBytes(blockId)
    +            }
    +            result match {
    +              case Some(values) =>
    +                return result
                   case None =>
                     logDebug(s"Block $blockId not found in externalBlockStore")
    --- End diff --
    
    ```
    Block $blockId not found in ExternalBlockStore
    ```



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