|
@@ -22,8 +22,8 @@ import java.util.Iterator;
|
|
|
import java.util.Map.Entry;
|
|
|
import java.util.concurrent.ConcurrentMap;
|
|
|
|
|
|
-import org.apache.commons.logging.Log;
|
|
|
-import org.apache.commons.logging.LogFactory;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.apache.hadoop.hdfs.nfs.conf.NfsConfigKeys;
|
|
|
import org.apache.hadoop.hdfs.nfs.conf.NfsConfiguration;
|
|
|
import org.apache.hadoop.nfs.nfs3.FileHandle;
|
|
@@ -39,7 +39,8 @@ import com.google.common.collect.Maps;
|
|
|
* used to maintain the writing context for a single file.
|
|
|
*/
|
|
|
class OpenFileCtxCache {
|
|
|
- private static final Log LOG = LogFactory.getLog(OpenFileCtxCache.class);
|
|
|
+ private static final Logger LOG =
|
|
|
+ LoggerFactory.getLogger(OpenFileCtxCache.class);
|
|
|
// Insert and delete with openFileMap are synced
|
|
|
private final ConcurrentMap<FileHandle, OpenFileCtx> openFileMap = Maps
|
|
|
.newConcurrentMap();
|
|
@@ -138,7 +139,7 @@ class OpenFileCtxCache {
|
|
|
|
|
|
// Cleanup the old stream outside the lock
|
|
|
if (toEvict != null) {
|
|
|
- toEvict.cleanup();
|
|
|
+ toEvict.cleanupWithLogger();
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
@@ -178,7 +179,7 @@ class OpenFileCtxCache {
|
|
|
|
|
|
// Invoke the cleanup outside the lock
|
|
|
for (OpenFileCtx ofc : ctxToRemove) {
|
|
|
- ofc.cleanup();
|
|
|
+ ofc.cleanupWithLogger();
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -214,7 +215,7 @@ class OpenFileCtxCache {
|
|
|
|
|
|
// Invoke the cleanup outside the lock
|
|
|
for (OpenFileCtx ofc : cleanedContext) {
|
|
|
- ofc.cleanup();
|
|
|
+ ofc.cleanupWithLogger();
|
|
|
}
|
|
|
}
|
|
|
|