jojochuang commented on code in PR #9491:
URL: https://github.com/apache/ozone/pull/9491#discussion_r2620436390


##########
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneFileSystem.java:
##########
@@ -954,7 +954,8 @@ public RemoteIterator<LocatedFileStatus> 
listLocatedStatus(Path f)
       throws IOException {
     incrementCounter(Statistic.INVOCATION_LIST_LOCATED_STATUS);
     return new OzoneFileStatusIterator<>(f,
-        (stat) -> stat instanceof LocatedFileStatus ? (LocatedFileStatus) stat 
: new LocatedFileStatus(stat, null),
+        (stat) -> stat instanceof LocatedFileStatus ? (LocatedFileStatus) stat 
:
+            new LocatedFileStatus(stat, stat.isFile() ? new BlockLocation[0] : 
null),

Review Comment:
   Good catch. It looks like BasicRootedOzoneFileSystem (ofs:) has the same 
bug. BasicOzoneFileSystem is o3fs which we don't recommend to use. Can you also 
add a fix there and add the corresponding test cases too.



-- 
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]

Reply via email to