mukul1987 commented on a change in pull request #782: HDDS-1461. Optimize
listStatus api in OzoneFileSystem
URL: https://github.com/apache/hadoop/pull/782#discussion_r284610750
##########
File path:
hadoop-ozone/ozonefs/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystem.java
##########
@@ -219,6 +222,32 @@ public void testListStatusOnRoot() throws Exception {
assertFalse(fileStatus2.equals(dir12.toString()));
}
+ /**
+ * Tests listStatus operation on root directory.
+ */
+ @Test
+ public void testListStatusOnLargeDirectory() throws Exception {
+ Path root = new Path("/");
+ Set<String> paths = new TreeSet<>();
+ int numDirs = 5111;
+ for(int i = 0; i < numDirs; i++) {
+ Path p = new Path(root, String.valueOf(i));
+ fs.mkdirs(p);
+ paths.add(p.getName());
+ }
+
+ // ListStatus on root should return dir1 (even though /dir1 key does not
Review comment:
The comments here do not match with the assert in the next line. Can you
please have a look.
----------------------------------------------------------------
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]