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
1 changed files with 1 additions and 6 deletions

View File

@ -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();
}
/**