[ 
https://issues.apache.org/jira/browse/HDFS-10742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15434078#comment-15434078
 ] 

Arpit Agarwal commented on HDFS-10742:
--------------------------------------

bq. On a related note, the virtues of AutoCloseableLock (HADOOP-13466) are not 
obvious to me. Static analysis tools already catch what it enforces with 
AutoCloseable. Its interface is almost identical to 
java.util.concurrent.locks.Lock (admitting extensions like this). It seems to 
add an idiosyncrasy where there is already an idiom (with supporting tooling). 
Is there another advantage?
Hi Chris, there is no other advantage. It just eliminates the {{finally}} block.

[~vagarychen], I'll take a look at your patch.

> Measurement of lock held time in FsDatasetImpl
> ----------------------------------------------
>
>                 Key: HDFS-10742
>                 URL: https://issues.apache.org/jira/browse/HDFS-10742
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: datanode
>    Affects Versions: 3.0.0-alpha2
>            Reporter: Chen Liang
>            Assignee: Chen Liang
>         Attachments: HDFS-10742.001.patch, HDFS-10742.002.patch, 
> HDFS-10742.003.patch, HDFS-10742.004.patch
>
>
> This JIRA proposes to measure the time the of lock of {{FsDatasetImpl}} is 
> held by a thread. Doing so will allow us to measure lock statistics.
> This can be done by extending the {{AutoCloseableLock}} lock object in 
> {{FsDatasetImpl}}. In the future we can also consider replacing the lock with 
> a read-write lock.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to