diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java index 3fa8691a2d1..55d6bd22df2 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/FileSystemTimelineWriter.java +++ b/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