|
@@ -41,6 +41,7 @@ import java.util.concurrent.ExecutorService;
|
|
|
import java.util.concurrent.Executors;
|
|
|
import java.util.concurrent.Future;
|
|
|
|
|
|
+import org.apache.hadoop.io.IOUtils;
|
|
|
import org.apache.hadoop.thirdparty.com.google.common.annotations.VisibleForTesting;
|
|
|
import org.apache.hadoop.thirdparty.com.google.common.base.Preconditions;
|
|
|
import org.slf4j.Logger;
|
|
@@ -84,7 +85,6 @@ import org.apache.hadoop.fs.permission.FsAction;
|
|
|
import org.apache.hadoop.fs.permission.FsPermission;
|
|
|
import org.apache.hadoop.fs.statistics.IOStatistics;
|
|
|
import org.apache.hadoop.fs.statistics.IOStatisticsSource;
|
|
|
-import org.apache.hadoop.io.IOUtils;
|
|
|
import org.apache.hadoop.security.AccessControlException;
|
|
|
import org.apache.hadoop.security.token.Token;
|
|
|
import org.apache.hadoop.security.UserGroupInformation;
|
|
@@ -93,9 +93,11 @@ import org.apache.hadoop.util.DurationInfo;
|
|
|
import org.apache.hadoop.util.LambdaUtils;
|
|
|
import org.apache.hadoop.util.Progressable;
|
|
|
|
|
|
+import static org.apache.hadoop.fs.CommonConfigurationKeys.IOSTATISTICS_LOGGING_LEVEL;
|
|
|
+import static org.apache.hadoop.fs.CommonConfigurationKeys.IOSTATISTICS_LOGGING_LEVEL_DEFAULT;
|
|
|
import static org.apache.hadoop.fs.azurebfs.AbfsStatistic.*;
|
|
|
import static org.apache.hadoop.fs.impl.PathCapabilitiesSupport.validatePathCapabilityArgs;
|
|
|
-import static org.apache.hadoop.fs.statistics.IOStatisticsLogging.ioStatisticsToString;
|
|
|
+import static org.apache.hadoop.fs.statistics.IOStatisticsLogging.logIOStatisticsAtLevel;
|
|
|
|
|
|
/**
|
|
|
* A {@link org.apache.hadoop.fs.FileSystem} for reading and writing files stored on <a
|
|
@@ -166,8 +168,6 @@ public class AzureBlobFileSystem extends FileSystem
|
|
|
sb.append("uri=").append(uri);
|
|
|
sb.append(", user='").append(abfsStore.getUser()).append('\'');
|
|
|
sb.append(", primaryUserGroup='").append(abfsStore.getPrimaryGroup()).append('\'');
|
|
|
- sb.append(", \nIOStatistics: {").append(ioStatisticsToString(getIOStatistics()));
|
|
|
- sb.append("}");
|
|
|
sb.append('}');
|
|
|
return sb.toString();
|
|
|
}
|
|
@@ -490,6 +490,12 @@ public class AzureBlobFileSystem extends FileSystem
|
|
|
// does all the delete-on-exit calls, and may be slow.
|
|
|
super.close();
|
|
|
LOG.debug("AzureBlobFileSystem.close");
|
|
|
+ if (getConf() != null) {
|
|
|
+ String iostatisticsLoggingLevel =
|
|
|
+ getConf().getTrimmed(IOSTATISTICS_LOGGING_LEVEL,
|
|
|
+ IOSTATISTICS_LOGGING_LEVEL_DEFAULT);
|
|
|
+ logIOStatisticsAtLevel(LOG, iostatisticsLoggingLevel, getIOStatistics());
|
|
|
+ }
|
|
|
IOUtils.cleanupWithLogger(LOG, abfsStore, delegationTokenManager);
|
|
|
this.isClosed = true;
|
|
|
if (LOG.isDebugEnabled()) {
|