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


##########
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneFileSystem.java:
##########
@@ -732,20 +733,33 @@ private boolean o3Exists(final Path f) throws IOException 
{
 
   @Override
   public FileStatus[] listStatus(Path f) throws IOException {
+    return convertFileStatusArr(listStatusAdapter(f));
+  }
+
+  private FileStatus[] convertFileStatusArr(FileStatusAdapter[] adapterArr) {
+    FileStatus[] fileStatuses = new FileStatus[adapterArr.length];
+    int index = 0;
+    for (FileStatusAdapter statusAdapter : adapterArr) {
+      fileStatuses[index++] = convertFileStatus(statusAdapter);      
+    }
+    return fileStatuses;
+  }
+
+  
+  public FileStatusAdapter[] listStatusAdapter(Path f) throws IOException {

Review Comment:
   I think we should rewrite it to return List<FileStatusAdapter>.
   There's no point in creating a temp array that is going to be discarded 
right away.



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