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 529745cafc8..9e984559149 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 @@ -3719,12 +3719,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(); } /**