Zhe Zhang commented on HDFS-10872:

Thanks Erik for the patch! The structure looks good overall. A few comments:
# Since block reporting is a major factor of write locking, I think we should 
add the new unlock API to {{BlockManager}}. We are not removing any existing 
APIs so compatibility shouldn't be a concern. Due the size of the current patch 
we can probably do that in a separate JIRA though.
# Interesting that we are almost aligned with how audit logs are recorded. On 
the one hand this confirms that there's probably no easier way to get the 
method name. On the other hand we should construct a String variable that can 
be reused by audit logging and this locking metrics logic. This avoids one 
temporary variable for each method call.
# Have you considered integrating the Metrics logic into {{NameNodeMetrics}}?

> Add MutableRate metrics for FSNamesystemLock operations
> -------------------------------------------------------
>                 Key: HDFS-10872
>                 URL: https://issues.apache.org/jira/browse/HDFS-10872
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>            Reporter: Erik Krogen
>            Assignee: Erik Krogen
>         Attachments: FSLockPerf.java, HDFS-10872.000.patch
> Add metrics for FSNamesystemLock operations to see, overall, how long each 
> operation is holding the lock for. Use MutableRate metrics for now. 

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to