You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2020/11/23 17:49:04 UTC
[GitHub] [hadoop] bgaborg commented on a change in pull request #2425: HADOOP-17332. S3A MarkerTool -min and -max are inverted.
bgaborg commented on a change in pull request #2425:
URL: https://github.com/apache/hadoop/pull/2425#discussion_r528888051
##########
File path: hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/tools/ITestMarkerTool.java
##########
@@ -259,8 +259,25 @@ public void testRunAuditWithExpectedMarkers() throws Throwable {
AUDIT,
m(OPT_LIMIT), 0,
m(OPT_OUT), audit,
- m(OPT_MIN), expectedMarkersWithBaseDir,
- m(OPT_MAX), expectedMarkersWithBaseDir,
+ m(OPT_MIN), expectedMarkersWithBaseDir - 1,
+ m(OPT_MAX), expectedMarkersWithBaseDir + 1,
+ createdPaths.base);
+ expectMarkersInOutput(audit, expectedMarkersWithBaseDir);
+ }
+
+ @Test
+ public void testRunAuditWithExpectedMarkersSwappedMinMax() throws Throwable {
Review comment:
I wanted to ask for a test like this, but it's already here so LGTM.
##########
File path: hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/tools/MarkerTool.java
##########
@@ -513,6 +526,11 @@ private ScanResult scan(
final DirectoryPolicy filterPolicy)
throws IOException, ExitUtil.ExitException {
+ // safety check: min and max are correctly ordered at this point.
+ Preconditions.checkArgument(minMarkerCount <= maxMarkerCount,
Review comment:
it will harm nobody, we can leave this check here.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org