Skip to content

Conversation

@steveloughran
Copy link
Contributor

The addition of deprecated S3A configuration options in HADOOP-17318
triggered a reload of default (xml resource) configurations, which breaks
tests which fail if there's a per-bucket setting inconsistent with test
setup.

Creating an S3AFS instance before creating the Configuration() instance
for test runs gets that reload out the way before test setup takes
place.

Along with the fix, extra changes in the failing test suite to fail
fast when marker policy isn't as expected, and to log FS state better.

Testing: S3 London with marker policy forced to override (which is why this specific test failed)

@steveloughran steveloughran added bug fs/s3 changes related to hadoop-aws; submitter must declare test endpoint test test code changes labels Nov 18, 2020
@steveloughran steveloughran self-assigned this Nov 18, 2020
@hadoop-yetus

This comment has been minimized.

@hadoop-yetus

This comment has been minimized.

@steveloughran
Copy link
Contributor Author

OK.

Lines that start with ????? in the ASF License  report indicate files that do not have an Apache license header:
 !????? /home/jenkins/jenkins-home/workspace/hadoop-multibranch_PR-2473/src/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/lz4/lz4.h
 !????? /home/jenkins/jenkins-home/workspace/hadoop-multibranch_PR-2473/src/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-nativetask/src/main/native/lz4/lz4.c

I'd thought these files were deleted.

The addition of deprecated S3A configuration options in HADOOP-17318
triggered a reload of default (xml resource) configurations, which breaks
tests which fail if there's a per-bucket setting inconsistent with test
setup.

Creating an S3AFS instance before creating the Configuration() instance
for test runs gets that reload out the way before test setup takes
place.

Along with the fix, extra changes in the failing test suite to fail
fast when marker policy isn't as expected, and to log FS state better.

Change-Id: I9f58cf0d42c5ac98962b4a9fed9f3ff93ef182ac
Change-Id: Ic48f762aea7552ec1d204298326ad3f2c2b749ea
+Rebase to trunk to get rid of the license warnings

Change-Id: I679ea2711ce832700ef4aae0ce16008483ff40bc
@steveloughran steveloughran force-pushed the s3/HADOOP-17385-ITestS3ADeleteCost-failure branch from ebd8242 to 57f30e3 Compare November 23, 2020 15:31
@steveloughran
Copy link
Contributor Author

rebased to trunk to fix license warnings; fixed up error in JIRA ID.

tested: s3 london

@hadoop-yetus

This comment has been minimized.

FileSystem.getLocal(new Configuration());
// instantiate an S3A FS here here to force deprecated key load through the
// static initializers. See: HADOOP-17385
new S3AFileSystem();
Copy link

Choose a reason for hiding this comment

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

I think it would be cleaner if we could run the static initializers instead of creating an object without storing the reference. I know that there's a comment there stating that this is required because of a jira, but I don't see the point why would we create an object just to trigger side effects.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was about to say I don't know a way to trigger instantiation of static class initializers except by a new() call, but actually we can invoke any static method. How about I add a new static initializeClass() call and load it.

FWIW, what I'd really like is to be able to disable forced reload of configs, but I can't see a way to do that which wouldn't run the risk of damage

Rather than create and discard an instance, add a new static method
to S3AFS and invoke it in test setup. This forces the load

Change-Id: Id52b1c46912c6fedd2ae270e2b1eb2222a360329
@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.

LGTM +1

@bgaborg bgaborg merged commit 67dc092 into apache:trunk Nov 26, 2020
@steveloughran
Copy link
Contributor Author

thanks; will cp to branch-3.3 along with the PR which caused the regression.

asfgit pushed a commit that referenced this pull request Nov 26, 2020
…2473).

Contributed by Steve Loughran

The addition of deprecated S3A configuration options in HADOOP-17318
triggered a reload of default (xml resource) configurations, which breaks
tests which fail if there's a per-bucket setting inconsistent with test
setup.

Creating an S3AFS instance before creating the Configuration() instance
for test runs gets that reload out the way before test setup takes
place.

Along with the fix, extra changes in the failing test suite to fail
fast when marker policy isn't as expected, and to log FS state better.

Rather than create and discard an instance, add a new static method
to S3AFS and invoke it in test setup. This forces the load

Change-Id: Id52b1c46912c6fedd2ae270e2b1eb2222a360329
@steveloughran steveloughran deleted the s3/HADOOP-17385-ITestS3ADeleteCost-failure branch October 15, 2021 19:43
jojochuang pushed a commit to jojochuang/hadoop that referenced this pull request May 23, 2023
…on failure (apache#2473).

Contributed by Steve Loughran

The addition of deprecated S3A configuration options in HADOOP-17318
triggered a reload of default (xml resource) configurations, which breaks
tests which fail if there's a per-bucket setting inconsistent with test
setup.

Creating an S3AFS instance before creating the Configuration() instance
for test runs gets that reload out the way before test setup takes
place.

Along with the fix, extra changes in the failing test suite to fail
fast when marker policy isn't as expected, and to log FS state better.

Rather than create and discard an instance, add a new static method
to S3AFS and invoke it in test setup. This forces the load

Note: this was committed in 7.1.8 with the tag CDPD-19868.

Change-Id: Id52b1c46912c6fedd2ae270e2b1eb2222a360329
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 test test code changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants