Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-40718][CONNECT] Replace grpc-netty-shaded withgrpc-netty #38179

Closed
wants to merge 1 commit into from

Conversation

grundprinzip
Copy link
Contributor

What changes were proposed in this pull request?

This patch replaces the shaded version of Netty in GRPC with the unshaded one since we're shading the result again and want to avoid double shaded package names.

Why are the changes needed?

Unnecessary double shaded package names.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Existing tests will check for compilation break.

This patch replaces the shaded version of Netty in GRPC with the
unshaded one since we're shading the result again and want to avoid
double shaded package names.
@pan3793
Copy link
Member

pan3793 commented Oct 9, 2022

Have you considered the native libraries? they should be relocated as well
https://github.com/grpc/grpc-java/blob/fe8f474055054240fc68317fa3bb614c29e1df1c/netty/shaded/build.gradle#L83-L88

@pan3793
Copy link
Member

pan3793 commented Oct 9, 2022

cc @LuciferYang, as you are working on #38162

Copy link
Contributor

@LuciferYang LuciferYang left a comment

Choose a reason for hiding this comment

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

LGTM and I wonder if grpc can share netty with Spark?

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@dongjoon-hyun dongjoon-hyun changed the title [CONNECT] [SPARK-40718] Replace grpc-netty-shaded withgrpc-netty. [SPARK-40718][CONNECT] Replace grpc-netty-shaded withgrpc-netty Oct 9, 2022
@dongjoon-hyun
Copy link
Member

Merged to master. Thank you all.

@LuciferYang
Copy link
Contributor

@grundprinzip Sorry to bother you, but I found after this pr Spark will deps 2 versions of netty, 4.1.80 and 4.1.72

[INFO] --- maven-dependency-plugin:3.3.0:tree (default-cli) @ spark-connect_2.12 ---
[INFO] org.apache.spark:spark-connect_2.12:jar:3.4.0-SNAPSHOT
[INFO] +- org.apache.spark:spark-core_2.12:jar:3.4.0-SNAPSHOT:provided
[INFO] |  +- org.apache.avro:avro:jar:1.11.1:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-core:jar:2.13.4:compile
[INFO] |  |  \- org.apache.commons:commons-compress:jar:1.21:compile
[INFO] |  +- org.apache.avro:avro-mapred:jar:1.11.1:compile
[INFO] |  |  \- org.apache.avro:avro-ipc:jar:1.11.1:compile
[INFO] |  |     \- org.tukaani:xz:jar:1.8:compile
[INFO] |  +- com.twitter:chill_2.12:jar:0.10.0:provided
[INFO] |  |  \- com.esotericsoftware:kryo-shaded:jar:4.0.2:provided
[INFO] |  |     \- com.esotericsoftware:minlog:jar:1.3.0:provided
[INFO] |  +- com.twitter:chill-java:jar:0.10.0:provided
[INFO] |  +- org.apache.xbean:xbean-asm9-shaded:jar:4.21:provided
[INFO] |  +- org.apache.hadoop:hadoop-client-api:jar:3.3.4:compile
[INFO] |  +- org.apache.hadoop:hadoop-client-runtime:jar:3.3.4:compile
[INFO] |  |  \- commons-logging:commons-logging:jar:1.1.3:runtime
[INFO] |  +- org.apache.spark:spark-launcher_2.12:jar:3.4.0-SNAPSHOT:provided
[INFO] |  +- org.apache.spark:spark-kvstore_2.12:jar:3.4.0-SNAPSHOT:provided
[INFO] |  |  +- org.fusesource.leveldbjni:leveldbjni-all:jar:1.8:provided
[INFO] |  |  \- com.fasterxml.jackson.core:jackson-annotations:jar:2.13.4:compile
[INFO] |  +- org.apache.spark:spark-network-common_2.12:jar:3.4.0-SNAPSHOT:provided
[INFO] |  |  \- com.google.crypto.tink:tink:jar:1.7.0:provided
[INFO] |  +- org.apache.spark:spark-network-shuffle_2.12:jar:3.4.0-SNAPSHOT:provided
[INFO] |  +- org.apache.spark:spark-unsafe_2.12:jar:3.4.0-SNAPSHOT:provided
[INFO] |  +- javax.activation:activation:jar:1.1.1:compile
[INFO] |  +- org.apache.curator:curator-recipes:jar:2.13.0:compile
[INFO] |  |  \- org.apache.curator:curator-framework:jar:2.13.0:compile
[INFO] |  |     \- org.apache.curator:curator-client:jar:2.13.0:compile
[INFO] |  +- org.apache.zookeeper:zookeeper:jar:3.6.2:compile
[INFO] |  |  +- commons-lang:commons-lang:jar:2.6:compile
[INFO] |  |  +- org.apache.zookeeper:zookeeper-jute:jar:3.6.2:compile
[INFO] |  |  \- org.apache.yetus:audience-annotations:jar:0.5.0:compile
[INFO] |  +- jakarta.servlet:jakarta.servlet-api:jar:4.0.3:provided
[INFO] |  +- commons-codec:commons-codec:jar:1.15:provided
[INFO] |  +- org.apache.commons:commons-lang3:jar:3.12.0:compile
[INFO] |  +- org.apache.commons:commons-math3:jar:3.6.1:provided
[INFO] |  +- org.apache.commons:commons-text:jar:1.9:provided
[INFO] |  +- commons-io:commons-io:jar:2.11.0:provided
[INFO] |  +- commons-collections:commons-collections:jar:3.2.2:provided
[INFO] |  +- org.apache.commons:commons-collections4:jar:4.4:provided
[INFO] |  +- com.google.code.findbugs:jsr305:jar:3.0.0:compile
[INFO] |  +- org.slf4j:slf4j-api:jar:2.0.3:compile
[INFO] |  +- org.slf4j:jul-to-slf4j:jar:2.0.3:provided
[INFO] |  +- org.slf4j:jcl-over-slf4j:jar:2.0.3:provided
[INFO] |  +- org.apache.logging.log4j:log4j-slf4j2-impl:jar:2.19.0:compile
[INFO] |  +- org.apache.logging.log4j:log4j-api:jar:2.19.0:compile
[INFO] |  +- org.apache.logging.log4j:log4j-core:jar:2.19.0:provided
[INFO] |  +- org.apache.logging.log4j:log4j-1.2-api:jar:2.19.0:compile
[INFO] |  +- com.ning:compress-lzf:jar:1.1:provided
[INFO] |  +- org.xerial.snappy:snappy-java:jar:1.1.8.4:compile
[INFO] |  +- org.lz4:lz4-java:jar:1.8.0:provided
[INFO] |  +- com.github.luben:zstd-jni:jar:1.5.2-4:compile
[INFO] |  +- org.roaringbitmap:RoaringBitmap:jar:0.9.32:provided
[INFO] |  |  \- org.roaringbitmap:shims:jar:0.9.32:provided
[INFO] |  +- org.scala-lang.modules:scala-xml_2.12:jar:2.1.0:provided
[INFO] |  +- org.scala-lang:scala-library:jar:2.12.17:provided
[INFO] |  +- org.scala-lang:scala-reflect:jar:2.12.17:provided
[INFO] |  +- org.json4s:json4s-jackson_2.12:jar:3.7.0-M11:provided
[INFO] |  |  \- org.json4s:json4s-core_2.12:jar:3.7.0-M11:provided
[INFO] |  |     +- org.json4s:json4s-ast_2.12:jar:3.7.0-M11:provided
[INFO] |  |     \- org.json4s:json4s-scalap_2.12:jar:3.7.0-M11:provided
[INFO] |  +- org.glassfish.jersey.core:jersey-client:jar:2.36:provided
[INFO] |  |  +- jakarta.ws.rs:jakarta.ws.rs-api:jar:2.1.6:provided
[INFO] |  |  \- org.glassfish.hk2.external:jakarta.inject:jar:2.6.1:provided
[INFO] |  +- org.glassfish.jersey.core:jersey-common:jar:2.36:provided
[INFO] |  |  +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:provided
[INFO] |  |  \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.3:provided
[INFO] |  +- org.glassfish.jersey.core:jersey-server:jar:2.36:provided
[INFO] |  |  \- jakarta.validation:jakarta.validation-api:jar:2.0.2:provided
[INFO] |  +- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.36:provided
[INFO] |  +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.36:provided
[INFO] |  +- org.glassfish.jersey.inject:jersey-hk2:jar:2.36:provided
[INFO] |  |  +- org.glassfish.hk2:hk2-locator:jar:2.6.1:provided
[INFO] |  |  |  +- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.6.1:provided
[INFO] |  |  |  +- org.glassfish.hk2:hk2-api:jar:2.6.1:provided
[INFO] |  |  |  \- org.glassfish.hk2:hk2-utils:jar:2.6.1:provided
[INFO] |  |  \- org.javassist:javassist:jar:3.25.0-GA:provided
[INFO] |  +- io.netty:netty-all:jar:4.1.80.Final:provided
[INFO] |  |  +- io.netty:netty-buffer:jar:4.1.80.Final:compile
[INFO] |  |  +- io.netty:netty-codec:jar:4.1.80.Final:compile
[INFO] |  |  +- io.netty:netty-common:jar:4.1.80.Final:compile
[INFO] |  |  +- io.netty:netty-handler:jar:4.1.80.Final:compile
[INFO] |  |  +- io.netty:netty-resolver:jar:4.1.80.Final:provided
[INFO] |  |  +- io.netty:netty-transport:jar:4.1.80.Final:compile
[INFO] |  |  +- io.netty:netty-transport-classes-epoll:jar:4.1.80.Final:provided
[INFO] |  |  \- io.netty:netty-transport-classes-kqueue:jar:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-transport-native-epoll:jar:linux-aarch_64:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-transport-native-kqueue:jar:osx-aarch_64:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-transport-native-kqueue:jar:osx-x86_64:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-tcnative-classes:jar:2.0.54.Final:provided
[INFO] |  +- com.clearspring.analytics:stream:jar:2.9.6:provided
[INFO] |  +- io.dropwizard.metrics:metrics-core:jar:4.2.10:provided
[INFO] |  +- io.dropwizard.metrics:metrics-jvm:jar:4.2.10:provided
[INFO] |  +- io.dropwizard.metrics:metrics-json:jar:4.2.10:provided
[INFO] |  +- io.dropwizard.metrics:metrics-graphite:jar:4.2.10:provided
[INFO] |  +- io.dropwizard.metrics:metrics-jmx:jar:4.2.10:provided
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.13.4:compile
[INFO] |  +- com.fasterxml.jackson.module:jackson-module-scala_2.12:jar:2.13.4:provided
[INFO] |  |  \- com.thoughtworks.paranamer:paranamer:jar:2.8:provided
[INFO] |  +- org.apache.ivy:ivy:jar:2.5.0:provided
[INFO] |  +- oro:oro:jar:2.0.8:provided
[INFO] |  +- net.razorvine:pickle:jar:1.2:provided
[INFO] |  +- net.sf.py4j:py4j:jar:0.10.9.7:provided
[INFO] |  \- org.apache.commons:commons-crypto:jar:1.1.0:provided
[INFO] +- org.apache.spark:spark-core_2.12:test-jar:tests:3.4.0-SNAPSHOT:test
[INFO] +- org.apache.spark:spark-catalyst_2.12:jar:3.4.0-SNAPSHOT:provided
[INFO] |  +- org.scala-lang.modules:scala-parser-combinators_2.12:jar:1.1.2:provided
[INFO] |  +- org.apache.spark:spark-sketch_2.12:jar:3.4.0-SNAPSHOT:provided
[INFO] |  +- org.codehaus.janino:janino:jar:3.1.7:provided
[INFO] |  +- org.codehaus.janino:commons-compiler:jar:3.1.7:provided
[INFO] |  +- org.antlr:antlr4-runtime:jar:4.9.3:provided
[INFO] |  +- com.univocity:univocity-parsers:jar:2.9.1:provided
[INFO] |  +- org.apache.arrow:arrow-vector:jar:9.0.0:provided
[INFO] |  |  +- org.apache.arrow:arrow-format:jar:9.0.0:provided
[INFO] |  |  +- org.apache.arrow:arrow-memory-core:jar:9.0.0:provided
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.13.4:provided
[INFO] |  |  \- com.google.flatbuffers:flatbuffers-java:jar:1.12.0:provided
[INFO] |  \- org.apache.arrow:arrow-memory-netty:jar:9.0.0:provided
[INFO] +- org.apache.spark:spark-sql_2.12:jar:3.4.0-SNAPSHOT:provided
[INFO] |  +- org.rocksdb:rocksdbjni:jar:7.6.0:provided
[INFO] |  +- org.apache.orc:orc-core:jar:shaded-protobuf:1.8.0:compile
[INFO] |  |  +- org.apache.orc:orc-shims:jar:1.8.0:compile
[INFO] |  |  +- io.airlift:aircompressor:jar:0.21:compile
[INFO] |  |  +- org.jetbrains:annotations:jar:17.0.0:compile
[INFO] |  |  \- org.threeten:threeten-extra:jar:1.7.1:compile
[INFO] |  +- org.apache.orc:orc-mapreduce:jar:shaded-protobuf:1.8.0:compile
[INFO] |  +- org.apache.hive:hive-storage-api:jar:2.7.3:compile
[INFO] |  +- org.apache.parquet:parquet-column:jar:1.12.3:compile
[INFO] |  |  +- org.apache.parquet:parquet-common:jar:1.12.3:compile
[INFO] |  |  \- org.apache.parquet:parquet-encoding:jar:1.12.3:compile
[INFO] |  \- org.apache.parquet:parquet-hadoop:jar:1.12.3:compile
[INFO] |     +- org.apache.parquet:parquet-format-structures:jar:1.12.3:compile
[INFO] |     \- org.apache.parquet:parquet-jackson:jar:1.12.3:runtime
[INFO] +- org.apache.spark:spark-catalyst_2.12:test-jar:tests:3.4.0-SNAPSHOT:test
[INFO] +- org.apache.spark:spark-sql_2.12:test-jar:tests:3.4.0-SNAPSHOT:test
[INFO] +- org.apache.spark:spark-tags_2.12:jar:3.4.0-SNAPSHOT:provided
[INFO] +- com.google.guava:guava:jar:31.0.1-jre:compile
[INFO] |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] |  +- org.checkerframework:checker-qual:jar:3.12.0:compile
[INFO] |  +- com.google.errorprone:error_prone_annotations:jar:2.7.1:compile
[INFO] |  \- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] +- com.google.protobuf:protobuf-java:jar:3.21.1:compile
[INFO] +- io.grpc:grpc-netty:jar:1.47.0:compile
[INFO] |  +- io.grpc:grpc-core:jar:1.47.0:compile
[INFO] |  |  +- com.google.code.gson:gson:jar:2.9.0:runtime
[INFO] |  |  +- com.google.android:annotations:jar:4.1.1.4:runtime
[INFO] |  |  \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.19:runtime
[INFO] |  +- io.netty:netty-codec-http2:jar:4.1.72.Final:compile
[INFO] |  |  \- io.netty:netty-codec-http:jar:4.1.72.Final:compile
[INFO] |  +- io.netty:netty-handler-proxy:jar:4.1.72.Final:runtime
[INFO] |  |  \- io.netty:netty-codec-socks:jar:4.1.72.Final:runtimea
[INFO] |  +- io.perfmark:perfmark-api:jar:0.25.0:runtime
[INFO] |  \- io.netty:netty-transport-native-unix-common:jar:4.1.72.Final:runtime
[INFO] +- io.grpc:grpc-protobuf:jar:1.47.0:compile
[INFO] |  +- io.grpc:grpc-api:jar:1.47.0:compile
[INFO] |  |  \- io.grpc:grpc-context:jar:1.47.0:compile
[INFO] |  +- com.google.api.grpc:proto-google-common-protos:jar:2.0.1:compile
[INFO] |  \- io.grpc:grpc-protobuf-lite:jar:1.47.0:compile
[INFO] +- io.grpc:grpc-services:jar:1.47.0:compile
[INFO] |  \- com.google.protobuf:protobuf-java-util:jar:3.19.2:runtime
[INFO] +- io.grpc:grpc-stub:jar:1.47.0:compile
[INFO] +- org.apache.tomcat:annotations-api:jar:6.0.53:provided
[INFO] +- org.scalacheck:scalacheck_2.12:jar:1.17.0:test
[INFO] |  \- org.scala-sbt:test-interface:jar:1.0:test
[INFO] +- org.mockito:mockito-core:jar:4.6.1:test
[INFO] |  +- net.bytebuddy:byte-buddy:jar:1.12.10:test
[INFO] |  +- net.bytebuddy:byte-buddy-agent:jar:1.12.10:test
[INFO] |  \- org.objenesis:objenesis:jar:3.2:provided
[INFO] +- org.spark-project.spark:unused:jar:1.0.0:compile
[INFO] +- org.scalatest:scalatest_2.12:jar:3.2.14:test
[INFO] |  +- org.scalatest:scalatest-core_2.12:jar:3.2.14:test
[INFO] |  |  +- org.scalatest:scalatest-compatible:jar:3.2.14:test
[INFO] |  |  \- org.scalactic:scalactic_2.12:jar:3.2.14:test
[INFO] |  +- org.scalatest:scalatest-featurespec_2.12:jar:3.2.14:test
[INFO] |  +- org.scalatest:scalatest-flatspec_2.12:jar:3.2.14:test
[INFO] |  +- org.scalatest:scalatest-freespec_2.12:jar:3.2.14:test
[INFO] |  +- org.scalatest:scalatest-funsuite_2.12:jar:3.2.14:test
[INFO] |  +- org.scalatest:scalatest-funspec_2.12:jar:3.2.14:test
[INFO] |  +- org.scalatest:scalatest-propspec_2.12:jar:3.2.14:test
[INFO] |  +- org.scalatest:scalatest-refspec_2.12:jar:3.2.14:test
[INFO] |  +- org.scalatest:scalatest-wordspec_2.12:jar:3.2.14:test
[INFO] |  +- org.scalatest:scalatest-diagrams_2.12:jar:3.2.14:test
[INFO] |  +- org.scalatest:scalatest-matchers-core_2.12:jar:3.2.14:test
[INFO] |  +- org.scalatest:scalatest-shouldmatchers_2.12:jar:3.2.14:test
[INFO] |  \- org.scalatest:scalatest-mustmatchers_2.12:jar:3.2.14:test
[INFO] +- org.scalatestplus:scalacheck-1-17_2.12:jar:3.2.14.0:test
[INFO] +- org.scalatestplus:mockito-4-6_2.12:jar:3.2.14.0:test
[INFO] +- org.scalatestplus:selenium-4-4_2.12:jar:3.2.14.0:test
[INFO] |  +- org.seleniumhq.selenium:selenium-java:jar:4.4.0:test
[INFO] |  |  +- org.seleniumhq.selenium:selenium-api:jar:4.4.0:test
[INFO] |  |  +- org.seleniumhq.selenium:selenium-chrome-driver:jar:4.4.0:test
[INFO] |  |  |  +- org.seleniumhq.selenium:selenium-chromium-driver:jar:4.4.0:test
[INFO] |  |  |  \- org.seleniumhq.selenium:selenium-json:jar:4.4.0:test
[INFO] |  |  +- org.seleniumhq.selenium:selenium-devtools-v102:jar:4.4.0:test
[INFO] |  |  +- org.seleniumhq.selenium:selenium-devtools-v103:jar:4.4.0:test
[INFO] |  |  +- org.seleniumhq.selenium:selenium-devtools-v104:jar:4.4.0:test
[INFO] |  |  +- org.seleniumhq.selenium:selenium-devtools-v85:jar:4.4.0:test
[INFO] |  |  +- org.seleniumhq.selenium:selenium-edge-driver:jar:4.4.0:test
[INFO] |  |  +- org.seleniumhq.selenium:selenium-firefox-driver:jar:4.4.0:test
[INFO] |  |  +- org.seleniumhq.selenium:selenium-ie-driver:jar:4.4.0:test
[INFO] |  |  +- org.seleniumhq.selenium:selenium-opera-driver:jar:4.4.0:test
[INFO] |  |  +- org.seleniumhq.selenium:selenium-remote-driver:jar:4.4.0:test
[INFO] |  |  |  +- com.beust:jcommander:jar:1.82:test
[INFO] |  |  |  +- io.opentelemetry:opentelemetry-api:jar:1.16.0:test
[INFO] |  |  |  +- io.opentelemetry:opentelemetry-context:jar:1.16.0:test
[INFO] |  |  |  +- io.opentelemetry:opentelemetry-exporter-logging:jar:1.16.0:test
[INFO] |  |  |  |  +- io.opentelemetry:opentelemetry-sdk-metrics:jar:1.16.0:test
[INFO] |  |  |  |  \- io.opentelemetry:opentelemetry-sdk-logs:jar:1.16.0-alpha:test
[INFO] |  |  |  +- io.opentelemetry:opentelemetry-sdk-common:jar:1.16.0:test
[INFO] |  |  |  +- io.opentelemetry:opentelemetry-sdk-extension-autoconfigure-spi:jar:1.16.0:test
[INFO] |  |  |  +- io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:jar:1.16.0-alpha:test
[INFO] |  |  |  +- io.opentelemetry:opentelemetry-sdk-trace:jar:1.16.0:test
[INFO] |  |  |  +- io.opentelemetry:opentelemetry-sdk:jar:1.16.0:test
[INFO] |  |  |  +- io.opentelemetry:opentelemetry-semconv:jar:1.16.0-alpha:test
[INFO] |  |  |  +- io.ous:jtoml:jar:2.0.0:test
[INFO] |  |  |  +- org.apache.commons:commons-exec:jar:1.3:test
[INFO] |  |  |  +- org.asynchttpclient:async-http-client:jar:2.12.3:test
[INFO] |  |  |  |  +- org.asynchttpclient:async-http-client-netty-utils:jar:2.12.3:test
[INFO] |  |  |  |  +- org.reactivestreams:reactive-streams:jar:1.0.3:test
[INFO] |  |  |  |  +- com.typesafe.netty:netty-reactive-streams:jar:2.0.4:test
[INFO] |  |  |  |  \- com.sun.activation:jakarta.activation:jar:1.2.2:test
[INFO] |  |  |  \- org.seleniumhq.selenium:selenium-http:jar:4.4.0:test
[INFO] |  |  |     \- dev.failsafe:failsafe:jar:3.2.4:test
[INFO] |  |  +- org.seleniumhq.selenium:selenium-safari-driver:jar:4.4.0:test
[INFO] |  |  \- org.seleniumhq.selenium:selenium-support:jar:4.4.0:test
[INFO] |  \- org.seleniumhq.selenium:htmlunit-driver:jar:3.64.0:test
[INFO] |     \- net.sourceforge.htmlunit:htmlunit:jar:2.64.0:test
[INFO] |        +- xalan:xalan:jar:2.7.2:test
[INFO] |        |  \- xalan:serializer:jar:2.7.2:test
[INFO] |        +- org.apache.httpcomponents:httpmime:jar:4.5.13:test
[INFO] |        |  \- org.apache.httpcomponents:httpclient:jar:4.5.13:test
[INFO] |        |     \- org.apache.httpcomponents:httpcore:jar:4.4.14:test
[INFO] |        +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.64.0:test
[INFO] |        +- net.sourceforge.htmlunit:neko-htmlunit:jar:2.64.0:test
[INFO] |        |  \- xerces:xercesImpl:jar:2.12.2:test
[INFO] |        |     \- xml-apis:xml-apis:jar:1.4.01:test
[INFO] |        +- net.sourceforge.htmlunit:htmlunit-cssparser:jar:1.12.0:test
[INFO] |        +- commons-net:commons-net:jar:3.8.0:test
[INFO] |        +- org.brotli:dec:jar:0.1.2:test
[INFO] |        +- com.shapesecurity:salvation2:jar:3.0.1:test
[INFO] |        \- org.eclipse.jetty.websocket:websocket-client:jar:9.4.48.v20220622:test
[INFO] |           +- org.eclipse.jetty:jetty-client:jar:9.4.49.v20220914:provided
[INFO] |           |  \- org.eclipse.jetty:jetty-http:jar:9.4.49.v20220914:provided
[INFO] |           +- org.eclipse.jetty:jetty-util:jar:9.4.49.v20220914:provided
[INFO] |           +- org.eclipse.jetty:jetty-io:jar:9.4.48.v20220622:provided
[INFO] |           \- org.eclipse.jetty.websocket:websocket-common:jar:9.4.48.v20220622:test
[INFO] |              \- org.eclipse.jetty.websocket:websocket-api:jar:9.4.48.v20220622:test
[INFO] +- junit:junit:jar:4.13.2:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] \- com.github.sbt:junit-interface:jar:0.13.3:test

@dongjoon-hyun
Copy link
Member

We use 4.1.80.Final explicitly and have dependency test, doesn't we? If you want, you may want to cut the transitive dependency explicitly.

@LuciferYang
Copy link
Contributor

LuciferYang commented Oct 10, 2022

The netty jars that grpc depends on have been explicitly excluded by Spark, because Spark does not need them before.

  1. Explicitly add them in the connect module and shade+relocation them into connect-assembly.jar
  2. Make Spark depends on these jars by default, connect module shares these jar

@dongjoon-hyun Which way do you prefer? I will submit a pr to solve this issue.

5 4 jars in total:

[INFO] |  +- io.netty:netty-codec-http2:jar:4.1.72.Final:compile
[INFO] |  |  \- io.netty:netty-codec-http:jar:4.1.72.Final:compile
[INFO] |  +- io.netty:netty-handler-proxy:jar:4.1.72.Final:runtime
[INFO] |  |  \- io.netty:netty-codec-socks:jar:4.1.72.Final:runtime

[INFO] | - io.netty:netty-transport-native-unix-common:jar:4.1.72.Final:runtime

HyukjinKwon pushed a commit to HyukjinKwon/spark that referenced this pull request Oct 10, 2022
…dependencies for the `connect` module

### What changes were proposed in this pull request?
After apache#38179, there are 2 netty version in Spark:

- 4.1.72 for `connect` module
- 4.1.80 for other modules

So this pr explicitly add netty related dependencies for the `connect` module to ensure Spark use unified netty version.

### Why are the changes needed?
Ensure Spark use unified netty version.

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
- Pass GitHub Actions
- Manual test:

run `mvn dependency:tree -pl connector/connect | grep netty`

Before

```
[INFO] |  +- io.netty:netty-all:jar:4.1.80.Final:provided
[INFO] |  |  +- io.netty:netty-buffer:jar:4.1.80.Final:compile
[INFO] |  |  +- io.netty:netty-codec:jar:4.1.80.Final:compile
[INFO] |  |  +- io.netty:netty-common:jar:4.1.80.Final:compile
[INFO] |  |  +- io.netty:netty-handler:jar:4.1.80.Final:compile
[INFO] |  |  +- io.netty:netty-resolver:jar:4.1.80.Final:provided
[INFO] |  |  +- io.netty:netty-transport:jar:4.1.80.Final:compile
[INFO] |  |  +- io.netty:netty-transport-classes-epoll:jar:4.1.80.Final:provided
[INFO] |  |  \- io.netty:netty-transport-classes-kqueue:jar:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-transport-native-epoll:jar:linux-aarch_64:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-transport-native-kqueue:jar:osx-aarch_64:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-transport-native-kqueue:jar:osx-x86_64:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-tcnative-classes:jar:2.0.54.Final:provided
[INFO] |  \- org.apache.arrow:arrow-memory-netty:jar:9.0.0:provided
[INFO] +- io.grpc:grpc-netty:jar:1.47.0:compile
[INFO] |  +- io.netty:netty-codec-http2:jar:4.1.72.Final:compile
[INFO] |  |  \- io.netty:netty-codec-http:jar:4.1.72.Final:compile
[INFO] |  +- io.netty:netty-handler-proxy:jar:4.1.72.Final:runtime
[INFO] |  |  \- io.netty:netty-codec-socks:jar:4.1.72.Final:runtime
[INFO] |  \- io.netty:netty-transport-native-unix-common:jar:4.1.72.Final:runtime
```

After

```
[INFO] |  +- io.netty:netty-all:jar:4.1.80.Final:provided
[INFO] |  |  +- io.netty:netty-resolver:jar:4.1.80.Final:provided
[INFO] |  |  +- io.netty:netty-transport-classes-epoll:jar:4.1.80.Final:provided
[INFO] |  |  \- io.netty:netty-transport-classes-kqueue:jar:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-transport-native-epoll:jar:linux-aarch_64:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-transport-native-kqueue:jar:osx-aarch_64:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-transport-native-kqueue:jar:osx-x86_64:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-tcnative-classes:jar:2.0.54.Final:provided
[INFO] |  \- org.apache.arrow:arrow-memory-netty:jar:9.0.0:provided
[INFO] +- io.grpc:grpc-netty:jar:1.47.0:compile
[INFO] +- io.netty:netty-codec-http2:jar:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-common:jar:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-buffer:jar:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-transport:jar:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-codec:jar:4.1.80.Final:provided
[INFO] |  +- io.netty:netty-handler:jar:4.1.80.Final:provided
[INFO] |  \- io.netty:netty-codec-http:jar:4.1.80.Final:provided
[INFO] +- io.netty:netty-handler-proxy:jar:4.1.80.Final:provided
[INFO] |  \- io.netty:netty-codec-socks:jar:4.1.80.Final:provided
[INFO] +- io.netty:netty-transport-native-unix-common:jar:4.1.80.Final:provided
```

Closes apache#38185 from LuciferYang/SPARK-40718-FOLLOWUP.

Authored-by: yangjie01 <yangjie01@baidu.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants