[
https://issues.apache.org/jira/browse/HADOOP-17023?focusedWorklogId=479517&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-479517
]
ASF GitHub Bot logged work on HADOOP-17023:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 07/Sep/20 08:02
Start Date: 07/Sep/20 08:02
Worklog Time Spent: 10m
Work Description: mukund-thakur commented on a change in pull request
#2257:
URL: https://github.com/apache/hadoop/pull/2257#discussion_r484259633
##########
File path:
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFileOperationCost.java
##########
@@ -176,6 +176,77 @@ public void testCostOfListFilesOnNonExistingDir() throws
Throwable {
.plus(GET_FILE_STATUS_FNFE)));
}
+ @Test
+ public void testCostOfListStatusOnFile() throws Throwable {
+ describe("Performing listStatus() on a file");
+ Path file = path(getMethodName() + ".txt");
+ S3AFileSystem fs = getFileSystem();
+ touch(fs, file);
+ verifyMetrics(() ->
+ fs.listStatus(file),
+ whenRaw(LIST_STATUS_LIST_OP
+ .plus(GET_FILE_STATUS_ON_FILE)),
+ whenAuthoritative(LIST_STATUS_LIST_OP),
+ whenNonauth(LIST_STATUS_LIST_OP));
+// resetMetricDiffs();
+// fs.listStatus(file);
+// if (!fs.hasMetadataStore()) {
+// metadataRequests.assertDiffEquals(1);
+// }
+// listRequests.assertDiffEquals(1);
+ }
+
+ @Test
+ public void testCostOfListStatusOnEmptyDir() throws Throwable {
+ describe("Performing listStatus() on an empty dir");
+ Path dir = path(getMethodName());
+ S3AFileSystem fs = getFileSystem();
+ fs.mkdirs(dir);
+ verifyMetrics(() ->
+ fs.listStatus(dir),
+ whenRaw(LIST_STATUS_LIST_OP
Review comment:
Sure 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]
Issue Time Tracking
-------------------
Worklog Id: (was: 479517)
Time Spent: 50m (was: 40m)
> Tune listStatus() api of s3a.
> -----------------------------
>
> Key: HADOOP-17023
> URL: https://issues.apache.org/jira/browse/HADOOP-17023
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/s3
> Affects Versions: 3.2.1
> Reporter: Mukund Thakur
> Assignee: Mukund Thakur
> Priority: Major
> Labels: pull-request-available
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Similar optimisation which was done for listLocatedSttaus()
> https://issues.apache.org/jira/browse/HADOOP-16465 can done for listStatus()
> api as well.
> This is going to reduce the number of remote calls in case of directory
> listing.
>
> CC [[email protected]] [~shwethags]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]