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


##########
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:
   The PR already fixes `BasicRootedOzoneFileSystem`, however, the test case is 
only for O3FS.  To avoid duplication, I recommend moving the test 
implementation to `OzoneFileSystemTests`, and calling it from both 
`AbstractOzoneFileSystemTest` and `AbstractRootedOzoneFileSystemTest`.



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