[
https://issues.apache.org/jira/browse/HADOOP-17323?focusedWorklogId=515073&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-515073
]
ASF GitHub Bot logged work on HADOOP-17323:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 21/Nov/20 14:44
Start Date: 21/Nov/20 14:44
Worklog Time Spent: 10m
Work Description: steveloughran commented on a change in pull request
#2479:
URL: https://github.com/apache/hadoop/pull/2479#discussion_r528203637
##########
File path:
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java
##########
@@ -3144,6 +3144,10 @@ S3AFileStatus s3GetFileStatus(final Path path,
"s3GetFileStatus(%s) wants to know if a directory is empty but"
+ " does not request a list probe", path);
+ if(key.isEmpty() && !needEmptyDirectoryFlag) {
Review comment:
nit: add a space after `if`
##########
File path:
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFileOperationCost.java
##########
@@ -258,6 +259,33 @@ public void testCostOfGetFileStatusOnMissingFile() throws
Throwable {
GET_FILE_STATUS_FNFE);
}
+ @Test
+ public void testCostOfRootFileStatus() throws Throwable {
+ Path root = path("/");
+ S3AFileStatus rootStatus = verifyRawInnerGetFileStatus(
+ root,
+ false,
+ StatusProbeEnum.ALL,
+ ROOT_FILE_STATUS_PROBE);
+ Assertions.assertThat(rootStatus.isDirectory())
Review comment:
for strictness, how about before L270 you do a status.toString() into a
variable, and include that at the end of each describedAs message. That way, if
there really was an assertion failure, we'd see the status
----------------------------------------------------------------
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: 515073)
Time Spent: 40m (was: 0.5h)
> s3a getFileStatus("/") to skip IO
> ---------------------------------
>
> Key: HADOOP-17323
> URL: https://issues.apache.org/jira/browse/HADOOP-17323
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/s3
> Affects Versions: 3.3.0
> Reporter: Steve Loughran
> Assignee: Mukund Thakur
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Calls to "hadoop fs ls s3a://something/" add a full getFileStatus() sequence
> (HEAD, LIST, LIST) because FsShell Ls calls getFileStatus on every input.
> We should just build a root status entry immediately. There's one
> consequence: if a user has disabled the s3a existence probe, there will be no
> checks for the bucket existence. But that can be viewed as a "well, that's
> what happens" behaviour
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]