ayushtkn commented on code in PR #4564:
URL: https://github.com/apache/ozone/pull/4564#discussion_r1166095830
##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystem.java:
##########
@@ -639,10 +641,16 @@ public void testListStatusWithIntermediateDir() throws
Exception {
}, 1000, 120000);
}
- FileStatus[] fileStatuses = fs.listStatus(parent);
+ List<FileStatus> fileStatuses = new ArrayList<>(Arrays.asList(
+ fs.listStatus(parent)));
+ Path trashRoot = new Path(OZONE_URI_DELIMITER, TRASH_PREFIX);
+ fileStatuses.removeIf(f -> trashRoot.equals(f.getPath()));
Review Comment:
Can we not use the ``listStatus`` with ``PathFilter`` option rather than
doing this filtering ourselves?
Something like or a better variant as you like
```
fs.listStatus(parent, path -> path.toString().startsWith("/.Trash"));
```
--
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]