diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/main/java/org/apache/hadoop/yarn/server/timeline/LevelDBCacheTimelineStore.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/main/java/org/apache/hadoop/yarn/server/timeline/LevelDBCacheTimelineStore.java index 53c16554bf4..633f65aa520 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/main/java/org/apache/hadoop/yarn/server/timeline/LevelDBCacheTimelineStore.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timeline-pluginstorage/src/main/java/org/apache/hadoop/yarn/server/timeline/LevelDBCacheTimelineStore.java @@ -19,8 +19,6 @@ package org.apache.hadoop.yarn.server.timeline; import org.codehaus.jackson.map.ObjectMapper; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.apache.hadoop.classification.InterfaceAudience.Private; import org.apache.hadoop.classification.InterfaceStability.Unstable; import org.apache.hadoop.conf.Configuration; @@ -34,6 +32,8 @@ import org.iq80.leveldb.DB; import org.iq80.leveldb.DBIterator; import org.iq80.leveldb.Options; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.File; import java.io.IOException; @@ -58,8 +58,8 @@ @Private @Unstable public class LevelDBCacheTimelineStore extends KeyValueBasedTimelineStore { - private static final Log LOG - = LogFactory.getLog(LevelDBCacheTimelineStore.class); + private static final Logger LOG + = LoggerFactory.getLogger(LevelDBCacheTimelineStore.class); private static final String CACHED_LDB_FILE_PREFIX = "-timeline-cache.ldb"; private String dbId; private DB entityDb; @@ -102,7 +102,7 @@ protected synchronized void serviceInit(Configuration conf) throws Exception { localFS.setPermission(dbPath, LeveldbUtils.LEVELDB_DIR_UMASK); } } finally { - IOUtils.cleanup(LOG, localFS); + IOUtils.cleanupWithLogger(LOG, localFS); } LOG.info("Using leveldb path " + dbPath); entityDb = factory.open(new File(dbPath.toString()), options); @@ -113,7 +113,7 @@ protected synchronized void serviceInit(Configuration conf) throws Exception { @Override protected synchronized void serviceStop() throws Exception { - IOUtils.cleanup(LOG, entityDb); + IOUtils.cleanupWithLogger(LOG, entityDb); Path dbPath = new Path( configuration.get(YarnConfiguration.TIMELINE_SERVICE_LEVELDB_PATH), dbId + CACHED_LDB_FILE_PREFIX); @@ -125,7 +125,7 @@ protected synchronized void serviceStop() throws Exception { "timeline store " + dbPath); } } finally { - IOUtils.cleanup(LOG, localFS); + IOUtils.cleanupWithLogger(LOG, localFS); } super.serviceStop(); }