Skip to content

Conversation

@steveloughran
Copy link
Contributor

This patch

  • fixes the inversion
  • adds a precondition check
  • if the commands are supplied inverted, swaps them with a warning.
    This is to stop breaking any tests written to cope with the existing
    behavior.
  • adds tests for all this

Tested (IMarkerTool tests): S3 london

This patch
* fixes the inversion
* adds a precondition check
* if the commands are supplied inverted, swaps them with a warning.
  This is to stop breaking any tests written to cope with the existing
  behavior.
* adds tests for all this

Change-Id: Ibff4201abb0c26332c96c9c701901e0611b43ab8
@steveloughran
Copy link
Contributor Author

Anyone got any opinions here @mukund-thakur @mehakmeet @bgaborg ?

@hadoop-yetus

This comment has been minimized.

Copy link
Contributor

@mehakmeet mehakmeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, small typo.


// safety check: min and max are correctly ordered at this point.
Preconditions.checkArgument(minMarkerCount <= maxMarkerCount,
"Min marker count of %d is greather than the max value of %d",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: typo in "greater".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well spotted

throws IOException, ExitUtil.ExitException {

// safety check: min and max are correctly ordered at this point.
Preconditions.checkArgument(minMarkerCount <= maxMarkerCount,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Is this check required again since we have already swapped above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, but I'm just being extra paranoid

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will harm nobody, we can leave this check here.

Copy link
Contributor

@mukund-thakur mukund-thakur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM apart from just a minor question.

@steveloughran steveloughran added bug fs/s3 changes related to hadoop-aws; submitter must declare test endpoint labels Nov 17, 2020
@apache apache deleted a comment from hadoop-yetus Nov 17, 2020
Change-Id: I75916829a95605869fa7088d28ed63e95854f11b
@hadoop-yetus

This comment has been minimized.

Copy link

@bgaborg bgaborg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, and there is a new test so these values won't be swapped anymore.

throws IOException, ExitUtil.ExitException {

// safety check: min and max are correctly ordered at this point.
Preconditions.checkArgument(minMarkerCount <= maxMarkerCount,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will harm nobody, we can leave this check here.

}

@Test
public void testRunAuditWithExpectedMarkersSwappedMinMax() throws Throwable {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to ask for a test like this, but it's already here so LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wanted to make sure that anyone in QE wouldn't be upset with the fix :)

@steveloughran steveloughran merged commit 9b4faf2 into apache:trunk Nov 23, 2020
@steveloughran
Copy link
Contributor Author

merged to trunk; will backport with a retest and patch of the guava import

asfgit pushed a commit that referenced this pull request Nov 23, 2020
This patch
* fixes the inversion
* adds a precondition check
* if the commands are supplied inverted, swaps them with a warning.
  This is to stop breaking any tests written to cope with the existing
  behavior.

Contributed by Steve Loughran

Change-Id: I15c40863f0db0675c7d60db477cb3bf1693cae49
@steveloughran steveloughran deleted the s3/HADOOP-17332-marker-tool-min-max branch October 15, 2021 19:50
jojochuang pushed a commit to jojochuang/hadoop that referenced this pull request May 23, 2023
…pache#2425)

This patch
* fixes the inversion
* adds a precondition check
* if the commands are supplied inverted, swaps them with a warning.
  This is to stop breaking any tests written to cope with the existing
  behavior.

Contributed by Steve Loughran

Change-Id: I15c40863f0db0675c7d60db477cb3bf1693cae49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fs/s3 changes related to hadoop-aws; submitter must declare test endpoint

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants