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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]