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

Tsz Wo (Nicholas), SZE commented on HDFS-5398:
----------------------------------------------

Patch looks good.  Some minor comments:
- remove the following constructor since it is only used by another constructor.
{code}
  public DatanodeDescriptor(DatanodeID nodeID, 
                            int xceiverCount,
                            int failedVolumes) {
    ...
  }
{code}

- DatanodeDescriptor.getStorageReports() and 
DatanodeStorageInfo.getStorageReport() are only used in tests.  They can be 
moved to BlockManagerTestUtil. 

- There are quite a few "new StorageReport[ 0]".  How about adding an 
EMPTY_ARRAY so that it could reduce unnecessary object creations?  I.e.
{code}
// StorageReport.java
public static StorageReport[] EMPTY_ARRAY = {};
{code}


> NameNode changes to process storage reports per storage directory
> -----------------------------------------------------------------
>
>                 Key: HDFS-5398
>                 URL: https://issues.apache.org/jira/browse/HDFS-5398
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>    Affects Versions: Heterogeneous Storage (HDFS-2832)
>            Reporter: Arpit Agarwal
>            Assignee: Arpit Agarwal
>         Attachments: h5398.02.patch
>
>
> HDFS-5377 updates the datanode to send one storage report per storage 
> directory as part of heartbeat messages.
> This patch is to track corresponding changes to the NameNode.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to