From 165cec9c468d9dcf5e83f6d43cbb512a98da846c Mon Sep 17 00:00:00 2001 From: Mingfei <mingfei.shi@intel.com> Date: Tue, 18 Nov 2014 22:17:06 -0800 Subject: [PATCH] [Spark-4432]close InStream after the block is accessed InStream is not closed after data is read from Tachyon. which makes the blocks in Tachyon locked after accessed. Author: Mingfei <mingfei.shi@intel.com> Closes #3290 from shimingfei/lockFix and squashes the following commits: fffe345 [Mingfei] close InStream after the block is accessed --- core/src/main/scala/org/apache/spark/storage/TachyonStore.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/main/scala/org/apache/spark/storage/TachyonStore.scala b/core/src/main/scala/org/apache/spark/storage/TachyonStore.scala index 6dbad5ff05..233d1e2b7c 100644 --- a/core/src/main/scala/org/apache/spark/storage/TachyonStore.scala +++ b/core/src/main/scala/org/apache/spark/storage/TachyonStore.scala @@ -116,6 +116,8 @@ private[spark] class TachyonStore( case ioe: IOException => logWarning(s"Failed to fetch the block $blockId from Tachyon", ioe) None + } finally { + is.close() } } -- GitLab