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

Íñigo Goiri commented on HDFS-14258:
------------------------------------

Thanks for the unit tests.
Just one minor comment: you added some javadoc comments in the middle to mark 
the different phases, we should make them regular comments.
{quote}
And the Math.abs is required. When doing the deltas... if DN is reconfigured 
from 50 threads to 45 threads, that is a change of -5. To pull five "tickets" 
from the semaphore, to decrease the number of threads that can run, the code 
must request to acquire +5 ticket.
{quote}
I got the condition the other way.
So here we will always have a negative number (117 and 120 take care of this).
Does it make sense to just do -1 * delta? Or maybe reverse delta and filter the 
0 and negative case?


> Introduce Java Concurrent Package To DataXceiverServer Class
> ------------------------------------------------------------
>
>                 Key: HDFS-14258
>                 URL: https://issues.apache.org/jira/browse/HDFS-14258
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: datanode
>    Affects Versions: 3.2.0
>            Reporter: BELUGA BEHR
>            Assignee: BELUGA BEHR
>            Priority: Minor
>         Attachments: HDFS-14258.1.patch, HDFS-14258.2.patch, 
> HDFS-14258.3.patch, HDFS-14258.4.patch, HDFS-14258.5.patch, 
> HDFS-14258.6.patch, HDFS-14258.7.patch
>
>
> * Use Java concurrent package to replace current facilities in 
> {{DataXceiverServer}}.
> * A little bit of extra clean up



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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