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

    https://github.com/apache/spark/pull/5908#discussion_r30115034
  
    --- Diff: 
core/src/main/scala/org/apache/spark/storage/TachyonBlockManager.scala ---
    @@ -95,8 +94,23 @@ private[spark] class TachyonBlockManager() extends 
ExternalBlockManager with Log
       override def putBytes(blockId: BlockId, bytes: ByteBuffer): Unit = {
         val file = getFile(blockId)
         val os = file.getOutStream(WriteType.TRY_CACHE)
    -    os.write(bytes.array())
    -    os.close()
    +    try {
    +      os.write(bytes.array())
    +      os.close()
    --- End diff --
    
    The logic here is that: if any exception happens in write() or close(),  
cancel the block file. And current code is able to cache all exceptions.
    The OutStream is realized in Tachyon, not common OutStream in Java.


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