Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@steveloughran
Copy link
Contributor

Adds another class with the dependencies, uses reflection to load and invoke
that.

Change-Id: Iaad9ede15dc6ac3240cba3dfa80c79825dbd007c

…lient.

Adds another class with the dependencies, uses reflection to load and invoke
that.

Change-Id: Iaad9ede15dc6ac3240cba3dfa80c79825dbd007c
@steveloughran
Copy link
Contributor Author

testing: done the unit tests but not a full live run (which it will need)

@cwensel -this look good to you?

@steveloughran steveloughran added bug fs/s3 changes related to hadoop-aws; submitter must declare test endpoint labels Jan 6, 2021
@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 1m 4s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-1 ❌ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚 mvninstall 32m 49s trunk passed
+1 💚 compile 0m 44s trunk passed with JDK Ubuntu-11.0.9.1+1-Ubuntu-0ubuntu1.18.04
+1 💚 compile 0m 37s trunk passed with JDK Private Build-1.8.0_275-8u275-b01-0ubuntu1~18.04-b01
+1 💚 checkstyle 0m 29s trunk passed
+1 💚 mvnsite 0m 44s trunk passed
+1 💚 shadedclient 18m 2s branch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 26s trunk passed with JDK Ubuntu-11.0.9.1+1-Ubuntu-0ubuntu1.18.04
+1 💚 javadoc 0m 35s trunk passed with JDK Private Build-1.8.0_275-8u275-b01-0ubuntu1~18.04-b01
+0 🆗 spotbugs 1m 13s Used deprecated FindBugs config; considering switching to SpotBugs.
+1 💚 findbugs 1m 11s trunk passed
_ Patch Compile Tests _
+1 💚 mvninstall 0m 38s the patch passed
+1 💚 compile 0m 39s the patch passed with JDK Ubuntu-11.0.9.1+1-Ubuntu-0ubuntu1.18.04
+1 💚 javac 0m 39s the patch passed
+1 💚 compile 0m 32s the patch passed with JDK Private Build-1.8.0_275-8u275-b01-0ubuntu1~18.04-b01
+1 💚 javac 0m 32s the patch passed
-0 ⚠️ checkstyle 0m 22s /diff-checkstyle-hadoop-tools_hadoop-aws.txt hadoop-tools/hadoop-aws: The patch generated 2 new + 0 unchanged - 2 fixed = 2 total (was 2)
+1 💚 mvnsite 0m 36s the patch passed
-1 ❌ whitespace 0m 0s /whitespace-eol.txt The patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply
+1 💚 shadedclient 16m 30s patch has no errors when building and testing our client artifacts.
+1 💚 javadoc 0m 19s the patch passed with JDK Ubuntu-11.0.9.1+1-Ubuntu-0ubuntu1.18.04
+1 💚 javadoc 0m 26s the patch passed with JDK Private Build-1.8.0_275-8u275-b01-0ubuntu1~18.04-b01
+1 💚 findbugs 1m 9s the patch passed
_ Other Tests _
+1 💚 unit 1m 33s hadoop-aws in the patch passed.
+1 💚 asflicense 0m 35s The patch does not generate ASF License warnings.
82m 16s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2599/1/artifact/out/Dockerfile
GITHUB PR #2599
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient findbugs checkstyle
uname Linux 8a3527a9aa95 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / d21c1c6
Default Java Private Build-1.8.0_275-8u275-b01-0ubuntu1~18.04-b01
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.9.1+1-Ubuntu-0ubuntu1.18.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_275-8u275-b01-0ubuntu1~18.04-b01
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2599/1/testReport/
Max. process+thread count 536 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-aws U: hadoop-tools/hadoop-aws
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-2599/1/console
versions git=2.17.1 maven=3.6.0 findbugs=4.0.6
Powered by Apache Yetus 0.13.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.

@cwensel
Copy link

cwensel commented Jan 6, 2021

@steveloughran without actually running it,

  • what would the fallback behavior be if the shaded artifact isn't found leaving the default SSL factory?
  • should the unshaded factory class be loaded and configured if available?

@steveloughran
Copy link
Contributor Author

if it's not found you don't get any attempts to patch in the wildfly/openssl library. HTTPS connections may be slower.

You will stay with the java https factory. I think you may retain the inefficient algorithm which came with java8; there's a bit of fixup in the hadoop-common lib to strip out one of them.

Other than that, if you have wildfly and openssl on the CP, you won't see any speedup, because you won't get that native library binding

that wildfly/openssl binding has been a PITA; very brittle. I don't want to go near it if I can help it, and doing the fixup for unshaded JARs will add a codepath which will not get tested during normal builds. We have enough problems that the JAR and various openssl releases have been incompatible, making it brittle on some linux images. The fact that an azure SDK kept the old widfly classes hidden unshaded in its JAR made this very hard to eliminate as source of stack traces.

Given you want to use the unshaded JARs for lighter images, I think you'll have to accept that a price of that is "no speedup from native openssl". That's all. What is important is: you won't get linkage errors any more

@cwensel
Copy link

cwensel commented Jan 7, 2021

this is an unfortunate tradeoff. I'll gladly opt for improved runtime performance vs improved build and deployment performance.

is it not possible, if not reasonable, to have both by adding a new class that couples to the unshaded class in tandem to the current proposed class that couples to the shaded? this seems like a reasonable tax on the choice to use a shaded library and coupling to its internals.

@steveloughran
Copy link
Contributor Author

is it not possible, if not reasonable, to have both by adding a new class that couples to the unshaded class in tandem to the current proposed class that couples to the shaded? this seems like a reasonable tax on the choice to use a shaded library and coupling to its internals.

yes, if someone plans to do it. They'd need to do 100% reflection binding (this code compiles against the shaded one) and presumably there'd be e a binding mechanism which switches between them.

I'm not going to go near this. What this patch tries to do is make your deployments work.

As to why we use the shaded library, you have to look at the dependencies of aws sdk, version problems we've had with json parsers, httpclient libs and the like to understand we've got good reason to say "use the shaded SDK". There's an implicit "all issues which can be fixed by "move to shaded AWS SDK" will be closed as wontfix".

We've chosen to use the shaded SDK to make those version problems go away. It's heavy, but makes versions manageable. I don't want to force people onto going onto the unshaded JARs if they really want to (hence this patch), but I'm not personally worried about the fact there may be a performance impact. Sorry.

@steveloughran
Copy link
Contributor Author

style

./hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/NetworkBinding.java:46:  private static final String BINDING_CLASSNAME = "org.apache.hadoop.fs.s3a.impl.ConfigureShadedAWSSocketFactory";: Line is longer than 80 characters (found 114). [LineLength]
./hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/NetworkBinding.java:89:          (Class<? extends ConfigureAWSSocketFactory>) Class.forName(BINDING_CLASSNAME);: Line is longer than 80 characters (found 88). [LineLength]

whitespace

hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/NetworkBinding.java:56:   * so as to avoid 

@cwensel
Copy link

cwensel commented Jan 7, 2021

I fully understand the situation. And appreciate the time and effort put into this issue.

@mukund-thakur
Copy link
Contributor

LGTM +1.
I understand that it is not nearly impossible to write a test.
Also I ran the IT suite with my bucket. All good.

@steveloughran
Copy link
Contributor Author

Thanks. Merging

@steveloughran steveloughran merged commit 26b9d48 into apache:trunk Feb 3, 2021
@steveloughran steveloughran changed the title HADOOP-17337. NetworkBinding has a runtime dependency on shaded httpclient HADOOP-17337. S3A NetworkBinding has a runtime dependency on shaded httpclient Feb 3, 2021
asfgit pushed a commit that referenced this pull request Feb 3, 2021
…ttpclient. (#2599)

Contributed by Steve Loughran.

Change-Id: I0471322fc88d8bc3896ac439aefb31e6a856936c
@steveloughran steveloughran deleted the s3/HADOOP-17337-shaded-sdk branch October 15, 2021 19:48
jojochuang pushed a commit to jojochuang/hadoop that referenced this pull request May 23, 2023
… on shaded httpclient. (apache#2599)

Contributed by Steve Loughran.

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

4 participants