[ 
https://issues.apache.org/jira/browse/SPARK-6479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14393590#comment-14393590
 ] 

Zhan Zhang edited comment on SPARK-6479 at 4/2/15 10:23 PM:
------------------------------------------------------------

[~rxin] Thanks for the feedback. I updated the document with the basic design 
and example on handling failure case thrown by underlying implementation. 
Basically, the shim layer handles all the exceptions/failure cases and return 
expected failure value to upper layer, similar to below example.

  override def getBytes(blockId: BlockId): Option[ByteBuffer] = {

    try {

      offHeapManager.flatMap(_.getBytes(blockId))

    } catch {

      case _ =>logError(s"error in getBytes from $blockId")

        None
    }
  }


was (Author: zzhan):
[~rxin] Thanks for the feedback. I updated the document with the basic design 
and example on handling failure case thrown by underlying implementation. 
Basically, the shim layer handles all the exceptions/failure cases and return 
expected failure value to upper layer, similar to below example.

  override def getBytes(blockId: BlockId): Option[ByteBuffer] = {
    try {
      offHeapManager.flatMap(_.getBytes(blockId))
    } catch {
      case _ =>logError(s"error in getBytes from $blockId")
        None
    }
  }

> Create off-heap block storage API (internal)
> --------------------------------------------
>
>                 Key: SPARK-6479
>                 URL: https://issues.apache.org/jira/browse/SPARK-6479
>             Project: Spark
>          Issue Type: Improvement
>          Components: Block Manager, Spark Core
>            Reporter: Reynold Xin
>         Attachments: SPARK-6479.pdf, SPARK-6479OffheapAPIdesign.pdf, 
> SparkOffheapsupportbyHDFS.pdf
>
>
> Would be great to create APIs for off-heap block stores, rather than doing a 
> bunch of if statements everywhere.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to