mukund-thakur commented on a change in pull request #2113:
URL: https://github.com/apache/hadoop/pull/2113#discussion_r450016787
##########
File path:
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFileOperationCost.java
##########
@@ -574,4 +574,48 @@ public void testCreateCost() throws Throwable {
}
}
+
+ @Test
+ public void testCostOfGlobStatus() throws Throwable {
+ describe("Test globStatus has expected cost");
+ S3AFileSystem fs = getFileSystem();
+ assume("Unguarded FS only", !fs.hasMetadataStore());
+
+ Path basePath = path("testCostOfGlobStatus/nextFolder/");
+
+ // create a bunch of files
+ int filesToCreate = 10;
+ for (int i = 0; i < filesToCreate; i++) {
+ try (FSDataOutputStream out = fs.create(basePath.suffix("/" + i))) {
+ verifyOperationCount(1, 1);
+ }
+ }
+
+ fs.globStatus(basePath.suffix("/*"));
+ // 2 head + 1 list from getFileStatus on path,
+ // plus 1 list to match the glob pattern
+ verifyOperationCount(2, 2);
+ }
+
+ @Test
+ public void testCostOfGlobStatusNoSymlinkResolution() throws Throwable {
Review comment:
Both these tests look almost the same in terms operation counts and also
the symlink resolution is always disabled.
Can you please tell me why do we need two tests here? Thanks.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]