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

Vinay commented on HDFS-5286:
-----------------------------

Thanks Nicholas, 
Patch looks pretty good.

Following are some of my doubts.. If its ok for you, then here is my +1!!

Here dont we need to call the {{addSpaceConsumed2Parent}} regardless of current 
directory have quota set or not..?
{code}+  @Override
+  public void addSpaceConsumed(long nsDelta, long dsDelta, boolean verify) 
+      throws QuotaExceededException {
+    final DirectoryWithQuotaFeature q = getDirectoryWithQuotaFeature();
+    if (q != null) {
+      q.addSpaceConsumed(this, nsDelta, dsDelta, verify);
+    } else {
+      addSpaceConsumed2Parent(nsDelta, dsDelta, verify);
+    }
+  }{code}


Do you have any plan to add separate methods to Abstract classes in INodeFile 
and INodeDirectory..? currently both of these are looks duplicated
Instead can't we make interface as Abstract and remove these duplicated classes 
in INodeFile and INodeDirecory..? 
{code}
+  public static abstract class Feature implements INode.Feature<Feature> {
     private Feature nextFeature;{code}

> Flatten INodeDirectory hierarchy: add DirectoryWithQuotaFeature
> ---------------------------------------------------------------
>
>                 Key: HDFS-5286
>                 URL: https://issues.apache.org/jira/browse/HDFS-5286
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>         Attachments: h5286_20131122.patch, h5286_20131125.patch, 
> h5286_20131125b.patch
>
>
> Similar to the case of INodeFile (HFDS-5285), we should also flatten the 
> INodeDirectory hierarchy.
> This is the first step to add DirectoryWithQuotaFeature for replacing 
> INodeDirectoryWithQuota.



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

Reply via email to