jojochuang commented on a change in pull request #1725: HDFS-13616. Batch 
listing of multiple directories
URL: https://github.com/apache/hadoop/pull/1725#discussion_r348844926
 
 

 ##########
 File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
 ##########
 @@ -3923,6 +3944,148 @@ DirectoryListing getListing(String src, byte[] 
startAfter,
     return dl;
   }
 
+  public byte[] getSrcPathsHash(String[] srcs) {
+    MessageDigest md;
+    try {
+      md = MessageDigest.getInstance("MD5");
+    } catch (NoSuchAlgorithmException e) {
+      throw new RuntimeException(e);
+    }
+
+    for (String src: srcs) {
+      md.update(src.getBytes(Charsets.UTF_8));
+    }
+    return md.digest();
+  }
+
+  BatchedDirectoryListing getBatchedListing(String[] srcs, byte[] startAfter,
 
 Review comment:
   This method is longer than I can possibly understand. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to