Repository: hadoop
Updated Branches:
  refs/heads/trunk ce2847e79 -> aab9737a0


HADOOP-13822. Use GlobalStorageStatistics.INSTANCE.reset() at 
FileSystem#clearStatistics(). Contribute by Brahma Reddy Battula


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/aab9737a
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/aab9737a
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/aab9737a

Branch: refs/heads/trunk
Commit: aab9737a058c0bdeeb17c173e530b7e571315a56
Parents: ce2847e
Author: Mingliang Liu <[email protected]>
Authored: Wed Nov 16 20:04:57 2016 -0800
Committer: Mingliang Liu <[email protected]>
Committed: Wed Nov 16 20:08:48 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/aab9737a/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 529745c..9e98455 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<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]

Reply via email to