[
https://issues.apache.org/jira/browse/HDFS-10682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15403118#comment-15403118
]
Arpit Agarwal commented on HDFS-10682:
--------------------------------------
bq. And I think we need dataset to expose lock acquire and release to those
callers. What do you think?
Hi [~vagarychen], yes that's correct. We'd need FsDatasetImpl (and perhaps
FsDatasetSpi) to expose locking routines.
bq. I was trying to take into account lock acquire time and lock release time
there, which requires recording time before acquiring lock and after releasing
lock and this is ThreadLocal is all about.
Yes I agree with the idea, if we want to incorporate lock-held/release time
we'd need either thread locals or the map you talked about. But we can skip
measuring those values for simplicity and to avoid questions like thread local
overhead. We can consider adding more measurements later.
> Replace FsDatasetImpl object lock with a separate lock object
> -------------------------------------------------------------
>
> Key: HDFS-10682
> URL: https://issues.apache.org/jira/browse/HDFS-10682
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: datanode
> Reporter: Chen Liang
> Assignee: Chen Liang
> Attachments: HDFS-10682.001.patch, HDFS-10682.002.patch,
> HDFS-10682.003.patch, HDFS-10682.004.patch, HDFS-10682.005.patch,
> HDFS-10682.006.patch
>
>
> Add a metric to measure the time the lock of FSDataSetImpl is held by a
> thread. The goal is to expose this for users to identify operations that
> locks dataset for long time ("long" in some sense) and be able to
> understand/reason/track the operation based on logs.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]