ivandika3 commented on code in PR #5003:
URL: https://github.com/apache/ozone/pull/5003#discussion_r1249257095
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneBucket.java:
##########
@@ -1099,9 +1131,105 @@ public OzoneKey next() {
*/
List<OzoneKey> getNextListOfKeys(String prevKey) throws
IOException {
+ // If shallow is true, only list immediate children
+ if (shallow) {
+ return getNextShallowListOfKeys(prevKey);
+ }
return proxy.listKeys(volumeName, name, keyPrefix, prevKey,
listCacheSize);
}
+
+ /**
+ * Using listStatus instead of listKeys avoiding listing all children keys.
+ * Giving the structure of keys delimited by "/":
+ *
+ * buck-1
+ * |
+ * a
+ * |
+ * -----------------------------------
+ * | | |
+ * b1 b2 b3
+ * ----- -------- ----------
+ * | | | | | | | |
+ * c1 c2 d1 d2 d3 e1 e2 e3
+ * | |
+ * -------- |
+ * | | |
+ * d21.txt d22.txt e11.txt
+ *
+ * For the above structure, the keys listed delimited "/" in order are
+ * as follows:
+ * a/
+ * a/b1/
+ * a/b1/c1/
+ * a/b1/c2/
+ * a/b2/
+ * a/b2/d1/
+ * a/b2/d2/
+ * a/b2/d2/d21.txt
+ * a/b2/d3/
+ * a/b2/d3/d22.txt
Review Comment:
Based on the above structure, is it supposed to be `a/b2/d2/d22.txt`?
--
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]