HADOOP-13822. Use GlobalStorageStatistics.INSTANCE.reset() at FileSystem#clearStatistics(). Contribute by Brahma Reddy Battula
(cherry picked from commit aab9737a05
)
This commit is contained in:
parent
bbe993238d
commit
47526a25cc
|
@ -3717,12 +3717,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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue