[
https://issues.apache.org/jira/browse/HADOOP-13283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15672426#comment-15672426
]
Brahma Reddy Battula commented on HADOOP-13283:
-----------------------------------------------
Sorry for landing very late here.
I think {{GlobalStorageStatistics.INSTANCE.reset()}} would be enough.it also
handles synchonization on {{GlobalStorageStatistics.INSTANCE}}.
*FileSystem#clearStatistics()*
{code}
3622 final Iterator<StorageStatistics> iterator =
3623 GlobalStorageStatistics.INSTANCE.iterator();
3624 while (iterator.hasNext()) {
3625 final StorageStatistics statistics = iterator.next();
3626 statistics.reset();
{code}
As during this time, if any other stats is getting inserted, then
ConcurrentModificationException can occur.
[~liuml07],[~jnp] If you agree,we can handle in separate jira.??
> Support reset operation for new global storage statistics and per FS storage
> stats
> ----------------------------------------------------------------------------------
>
> Key: HADOOP-13283
> URL: https://issues.apache.org/jira/browse/HADOOP-13283
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs
> Reporter: Mingliang Liu
> Assignee: Mingliang Liu
> Fix For: 2.8.0, 3.0.0-alpha1
>
> Attachments: HADOOP-13283.000.patch, HADOOP-13283.001.patch,
> HADOOP-13283.002.patch, HADOOP-13283.003.patch, HADOOP-13283.004.patch
>
>
> Applications may reuse the file system object across jobs and its storage
> statistics should be reset. Specially the {{FileSystem.Statistics}} supports
> reset and [HADOOP-13032] needs to keep that use case valid.
> This jira is for supporting reset operations for storage statistics.
> Thanks [~hitesh] for reporting this.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]