浏览代码

YARN-5438. TimelineClientImpl leaking FileSystem Instances causing Long running services like HiverServer2 daemon going OOM. Contributed by Rohith Sharma K S
(cherry picked from commit a1890c32c52fed69ec09efad0fccf49ed8c2e21e)

Jason Lowe 8 年之前
父节点
当前提交
95fb2fe394

+ 1 - 2
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java

@@ -269,9 +269,8 @@ public class FileSystemTimelineWriter extends TimelineWriter{
     if (logFDsCache != null) {
       LOG.debug("Closing cache");
       logFDsCache.flush();
-      logFDsCache.close();
-      logFDsCache = null;
     }
+    IOUtils.cleanup(LOG, logFDsCache, fs);
   }
 
   @Override