xiaoyuyao commented on a change in pull request #547: HDDS-2928. Implement
ofs://: listStatus
URL: https://github.com/apache/hadoop-ozone/pull/547#discussion_r382217631
##########
File path:
hadoop-ozone/ozonefs/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneClientAdapterImpl.java
##########
@@ -439,11 +440,15 @@ public FileStatusAdapter getFileStatus(String path, URI
uri,
incrementCounter(Statistic.OBJECTS_QUERY);
OFSPath ofsPath = new OFSPath(path);
String key = ofsPath.getKeyName();
- // getFileStatus is called for root
+ // path is root
if (ofsPath.getVolumeName().isEmpty() &&
ofsPath.getBucketName().isEmpty()) {
- // Generate a FileStatusAdapter for root
- return rootFileStatusAdapter();
+ return getFileStatusAdapterForRoot(uri);
+ }
+ // path is a volume
+ if (ofsPath.getBucketName().isEmpty()) {
Review comment:
Same as above. Can we wrap with OFSPath#isVolume?
----------------------------------------------------------------
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]