chungen0126 commented on code in PR #11408:
URL: https://github.com/apache/ozone/pull/11408#discussion_r4189317273
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneBucket.java:
##########
@@ -1884,10 +1884,20 @@ List<OzoneKey> getNextShallowListOfKeys(String prevKey)
if (!addedKeyPrefix()) {
initDelimiterKeyPrefix();
+ final boolean listRoot = getKeyPrefix().isEmpty() &&
StringUtils.isEmpty(prevKey);
if (!prepareStack(prevKey)) {
return new ArrayList<>();
}
+ if (listRoot) {
+ startKey = "";
+ findFirstStartKey = true;
+ setAddedKeyPrefix(true);
+ }
+ }
+
+ // Root listings above are ready; other initial listings still need a
start key.
+ if (!addedKeyPrefix()) {
Review Comment:
We don't seem to need a separate `if (!addedKeyPrefix())` block here. This
logic can be merged into the existing `if (!addedKeyPrefix())` block above.
--
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]