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

Arpit Agarwal edited comment on HADOOP-13466 at 8/4/16 6:12 PM:
----------------------------------------------------------------

Thanks [~vagarychen]. Actually never mind, I think this text is fine to have.

+1 pending Jenkins result on the v2 patch.


was (Author: arpitagarwal):
Thanks [~vagarychen]. Minor comment - we can eliminate the following text from 
the AutoCloseableLock javadoc since the lock held count is a ReentrantLock 
detail. The rest of the Javadocs look great.

{code}
                                                                                
          then sets
43         * lock held count to one, then returns immediately.
44         *
45         * If the current thread already holds the lock, increase the lock
46         * help count by one and returns immediately.
{code}

{code}
65         * If the current thread holds the lock, decrements the hold
66         * count. If the hold count reaches zero, the lock is released.
{code}

{code}
                                                                                
        set the
92         * hold count to one and returns {@code true}.
93         *
94         * If the current thread already holds the lock, the increment the 
hold
95         * count by one and returns {@code true}.
{code}

By the way you don't need to click cancel/submit patch every time. :) Jenkins 
is smart enough to pick up the latest patch when you attach it.

> Add an AutoCloseableLock class
> ------------------------------
>
>                 Key: HADOOP-13466
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13466
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Chen Liang
>            Assignee: Chen Liang
>         Attachments: HADOOP-13466.001.patch, HADOOP-13466.002.patch
>
>
> Introduce an AutoCloseableLock class that allows using a RentrantLock with 
> try-with-resources syntax.
> The lock class is lightweight and performs no extra object allocations in the 
> lock acquire/release path.



--
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