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

Anu Engineer commented on HDFS-11548:
-------------------------------------

Thank you for updating the patch. Some very minor comments below.

* Could we please rewrite this pattern ? 
{code}
 try {
      lock.writeLock().lock();
{code}

* Replace this pattern with 
{code}
lock.writeLock().lock();
try {
        ...
} finally {
        lock.writeLock().unlock();
}
That seems to be the Java idiom. 
https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Lock.html
{code}

* nit: Preconditions.CheckNotNull(pool);
{code}
public void addNode(final String pool, final DatanodeID node) 
{code}
Same feedback in removeNode, checkNotNull on node.

* Hard coded nodeCount in {{testDefaultNodePoolReload}}


> OZone: SCM: Add node pool management API
> ----------------------------------------
>
>                 Key: HDFS-11548
>                 URL: https://issues.apache.org/jira/browse/HDFS-11548
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Xiaoyu Yao
>            Assignee: Xiaoyu Yao
>         Attachments: HDFS-11548-HDFS-7240.001.patch, 
> HDFS-11548-HDFS-7240.002.patch, HDFS-11548-HDFS-7240.003.patch
>
>
> The idea is to group registered nodes into pools of fixed size (say 24 nodes 
> per pool) so that the container allocation and report can all be handled 
> independently on a pool basis by SCM.  
> The initial patch will implement the following Node Pool API that 
> 1) add node to a node pool 
> 2) remove a node from a pool 
> 3) get the pool name that a node belongs to 
> 4) get all the pool names 
> 5) get all nodes of a pool
> The integration with SCM container allocation can be all nodes in a single 
> default pool upon registration. We will provide a CLI to manage multiple 
> pools and support for pool definition file later. 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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