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

Xiaoyu Yao commented on HDFS-7584:
----------------------------------

Thanks Arpit for the review and feedback. I will provide a new patch with the 
update soon. 

bq. I can think of at least one natural split:
Part 1 is the the API, protocol and tool changes.
Part 2 is the NameNode implementation.

That sounds good to me. I will try splitting it up after finishing the first 
round of review. 

bq. QuotaCounts: It has four telescoping constructors, all private. It is a 
little confusing. Can we simplify the constructors? e.g. the default 
constructor can be replaced with initializers.

Agree. That's something I plan to refactor as well. I tried the build pattern, 
which could help to main this class when we need add more counters in future 
that need to be initialized.  

bq. I did not understand the todo in INode.java:464. If it is something that 
would be broken and is not too hard to fix perhaps we should include it in the 
same checkin? This is perhaps another argument for splitting into two patches 
at a higher level.

This is for "hadoop fs -count -q" command where the majority of the change will 
not be under hadoop-hdfs-project. It also needs to move the StorageType.java 
from hadoop-hdfs to hadoop-common, which I prefer to change after the initial 
check in.

bq. QuotaCounts: typeSpaces and typeCounts are used interchangeably. We should 
probably name them consistently.
The parameter in the methods use typeSpaces to be consistent with the other 
parameters (namespace, diskspace). The class member variable is named 
typeCounts. 

bq. Nitpick, optional: EnumCounters.allLessOrEqual and .anyGreatOrEqual - can 
we use foreach loop?
Agree that foreach will make it syntactically neat. 


> Enable Quota Support for Storage Types
> --------------------------------------
>
>                 Key: HDFS-7584
>                 URL: https://issues.apache.org/jira/browse/HDFS-7584
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>          Components: datanode, namenode
>            Reporter: Xiaoyu Yao
>            Assignee: Xiaoyu Yao
>         Attachments: HDFS-7584 Quota by Storage Type - 01202015.pdf, 
> HDFS-7584.0.patch, HDFS-7584.1.patch, HDFS-7584.2.patch, HDFS-7584.3.patch, 
> HDFS-7584.4.patch, editsStored
>
>
> Phase II of the Heterogeneous storage features have completed by HDFS-6584. 
> This JIRA is opened to enable Quota support of different storage types in 
> terms of storage space usage. This is more important for certain storage 
> types such as SSD as it is precious and more performant. 
> As described in the design doc of HDFS-5682, we plan to add new 
> quotaByStorageType command and new name node RPC protocol for it. The quota 
> by storage type feature is applied to HDFS directory level similar to 
> traditional HDFS space quota. 



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

Reply via email to