You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2019/12/04 00:15:20 UTC

[GitHub] [hadoop] jojochuang commented on a change in pull request #1725: HDFS-13616. Batch listing of multiple directories

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_r353490718
 
 

 ##########
 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:
   ok. i'm just being lazy.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org