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

This commit is contained in:
Mingliang Liu 2016-11-16 20:04:57 -08:00
parent ce2847e794
commit aab9737a05

View File

@ -3719,12 +3719,7 @@ public StorageStatistics provide() {
* 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();
}
/**