Erik Krogen commented on HDFS-10872:

[~zhz] thanks for the detailed review!

1. Yes, if it lives shorter than the aggregation interval, its metrics will be 
lost. I was thinking the same that the threads are re-used so very few metrics 
should be lost, and also from within the {{FSNamesystemLock}} there wouldn't be 
any easy way to detect that the thread is exiting to flush its metrics. I think 
this is worth documenting though; I've added some discussion on the 
{{FSNamesystemLock}} Javadoc. 
2. Good point. I've added some guidance about a good default in 
3. This seems like a pretty interesting idea. It could be pretty simple / 
little implementation effort, but I think there is some question of if it will 
actually be helpful. I can code something up for this patch or leave it... Let 
me know what you think.   

1. Right. That {{yield()}} is only called as part of the {{contentSummary}} 
operation, just quickly releasing and reacquiring the lock which 
{{contentSummary}} originally held. The {{yield}} could make a single 
{{contentSummary}} appear as multiple operations instead of a single one, but 
the total time should still be accurate.
2. For any operation that already had an audit log name I kept that for 
consistency. Agreed that it doesn't make sense to change here.
3. Thanks, fixed. 
4. Yes, agreed. Not sure why I originally went with {{checkLease}}. I've 
changed it to {{leaseManager}} to be consistent with the name of the class. 
5. Agreed, changed. Good catch. 

Attaching v003 patch with changes discussed. 

> 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, 
> HDFS-10872.001.patch, HDFS-10872.002.patch, HDFS-10872.003.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