Hexiaoqiao commented on code in PR #5900:
URL: https://github.com/apache/hadoop/pull/5900#discussion_r1278571071


##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java:
##########
@@ -819,20 +821,34 @@ public void renewLease(String clientName, List<String> 
namespaces)
     }
   }
 
+  /**
+   * For {@link this#getListing(String,byte[],boolean)} to sort results.

Review Comment:
   This java doc are not compliant with rules. try to as the following style.
   `For {@link #getListing(String,byte[],boolean) GetLisiting} to sort results.`



##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/RouterClientProtocol.java:
##########
@@ -819,20 +821,34 @@ public void renewLease(String clientName, List<String> 
namespaces)
     }
   }
 
+  /**
+   * For {@link this#getListing(String,byte[],boolean)} to sort results.
+   */
+  private static class GetListingComparator
+      implements Comparator<byte[]>, Serializable {
+    @Override
+    public int compare(byte[] o1, byte[] o2) {
+      return DFSUtilClient.compareBytes(o1, o2);
+    }
+  }
+
+  private static final GetListingComparator comparator =

Review Comment:
   Don't need `final` modifier.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to