HADOOP-13822. Use GlobalStorageStatistics.INSTANCE.reset() at FileSystem#clearStatistics(). Contribute by Brahma Reddy Battula
This commit is contained in:
parent
ce2847e794
commit
aab9737a05
|
@ -3719,12 +3719,7 @@ public abstract class FileSystem extends Configured implements Closeable {
|
||||||
* Reset all statistics for all file systems
|
* Reset all statistics for all file systems
|
||||||
*/
|
*/
|
||||||
public static synchronized void clearStatistics() {
|
public static synchronized void clearStatistics() {
|
||||||
final Iterator<StorageStatistics> iterator =
|
GlobalStorageStatistics.INSTANCE.reset();
|
||||||
GlobalStorageStatistics.INSTANCE.iterator();
|
|
||||||
while (iterator.hasNext()) {
|
|
||||||
final StorageStatistics statistics = iterator.next();
|
|
||||||
statistics.reset();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue