tanvipenumudy commented on code in PR #4868:
URL: https://github.com/apache/ozone/pull/4868#discussion_r1374145117
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneBucket.java:
##########
@@ -1216,16 +1229,9 @@ protected List<OzoneKey> getNextShallowListOfKeys(String
prevKey)
startKey.equals(getKeyPrefix())) {
resultList.add(nextOneKeys.get(0));
}
-
- // prepare delimiterKeyPrefix
- delimiterKeyPrefix = getKeyPrefix();
- if (!getKeyPrefix().endsWith(OZONE_URI_DELIMITER)) {
- delimiterKeyPrefix = OzoneFSUtils.getParentDir(getKeyPrefix());
- }
}
- // Elements in statuses must be sorted after startKey,
- // which means they come after the keyPrefix.
+ // 2. Get immediate children by listStatus method
List<OzoneFileStatus> statuses = proxy.listStatus(volumeName, name,
Review Comment:
Since [HDDS-7715](https://issues.apache.org/jira/browse/HDDS-7715) (PR
https://github.com/apache/ozone/pull/5275) has been brought in recently, we
should be using the [lightweight listStatus
API](https://github.com/apache/ozone/blob/master/hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java#L2079-L2086)
here instead.
```
List<OzoneFileStatusLight> statuses = proxy.listStatusLight(volumeName,
name, delimiterKeyPrefix, false, startKey, listCacheSize, false);
```
--
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]