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

(cherry picked from commit aab9737a05)
This commit is contained in:
Mingliang Liu 2016-11-16 20:04:57 -08:00
parent cb0fccad19
commit c60ed3a3e4
1 changed files with 1 additions and 6 deletions

View File

@ -3532,12 +3532,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();
}
/**