diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java index 4693eb94326..63bd38a5b00 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java @@ -3717,12 +3717,7 @@ public abstract class FileSystem extends Configured implements Closeable { * Reset all statistics for all file systems */ public static synchronized void clearStatistics() { - final Iterator iterator = - GlobalStorageStatistics.INSTANCE.iterator(); - while (iterator.hasNext()) { - final StorageStatistics statistics = iterator.next(); - statistics.reset(); - } + GlobalStorageStatistics.INSTANCE.reset(); } /**