Repository: hadoop Updated Branches: refs/heads/branch-2 bbe993238 -> 47526a25c
HADOOP-13822. Use GlobalStorageStatistics.INSTANCE.reset() at FileSystem#clearStatistics(). Contribute by Brahma Reddy Battula (cherry picked from commit aab9737a058c0bdeeb17c173e530b7e571315a56) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/47526a25 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/47526a25 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/47526a25 Branch: refs/heads/branch-2 Commit: 47526a25cc31ad17a198214e18bbd6d2e6cf1627 Parents: bbe9932 Author: Mingliang Liu <[email protected]> Authored: Wed Nov 16 20:04:57 2016 -0800 Committer: Mingliang Liu <[email protected]> Committed: Wed Nov 16 20:09:07 2016 -0800 ---------------------------------------------------------------------- .../src/main/java/org/apache/hadoop/fs/FileSystem.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/47526a25/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java ---------------------------------------------------------------------- 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 4693eb9..63bd38a 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<StorageStatistics> iterator = - GlobalStorageStatistics.INSTANCE.iterator(); - while (iterator.hasNext()) { - final StorageStatistics statistics = iterator.next(); - statistics.reset(); - } + GlobalStorageStatistics.INSTANCE.reset(); } /** --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
