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

Vinay commented on HDFS-5531:
-----------------------------

Patch looks pretty good Nicholas.
One small nit which will fix the test failures I hope ( I verified in local).

{code}+  public boolean equals(Object obj) {
+    if (obj == this) {
+      return true;
+    } else if (obj == null || !(obj instanceof EnumCounters)) {
+      return false;
+    }
+    final EnumCounters<?> that = (EnumCounters<?>)obj;
+    return this.enumConstants == that.enumConstants
+        && Arrays.equals(this.counters, that.counters);
+  }{code}

Here 
{{return this.enumConstants == that.enumConstants}} will always returns false 
as {{Quota.values()==Quota.values()}} is always false.
Should be replaced with {{Arrays.equals(this.enumConstants, 
that.enumConstants)}}.
This will make the test pass.

> Combine the getNsQuota() and getDsQuota() methods in INode
> ----------------------------------------------------------
>
>                 Key: HDFS-5531
>                 URL: https://issues.apache.org/jira/browse/HDFS-5531
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>            Reporter: Tsz Wo (Nicholas), SZE
>            Assignee: Tsz Wo (Nicholas), SZE
>            Priority: Minor
>         Attachments: h5531_20131119.patch
>
>
> I suggest to combine these two methods into 
> {code}
> public Quota.Counts getQuotaCounts()
> {code}



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

Reply via email to