[
https://issues.apache.org/jira/browse/BEAM-5366?focusedWorklogId=156135&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-156135
]
ASF GitHub Bot logged work on BEAM-5366:
----------------------------------------
Author: ASF GitHub Bot
Created on: 18/Oct/18 21:17
Start Date: 18/Oct/18 21:17
Worklog Time Spent: 10m
Work Description: lukecwik closed pull request #6499: [BEAM-5366] Vendor
gRPC and its transitive dependencies as a separate package.
URL: https://github.com/apache/beam/pull/6499
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
index 28548c09ddd..e1467e2f5fa 100644
--- a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
@@ -1314,63 +1314,94 @@ artifactId=${project.name}
/**
***********************************************************************************************/
+ // We specifically export the shadow closure and the dependencies closure
so that they
+ // can be re-used by the beam-vendor-java-grpc-v1 project and within the
applyPortabilityNature
+ // block.
+ project.ext.GRPC_V1_SHADOW_CLOSURE = {
+ // The relocation paths below specifically use the major version number
of the dependency
+ // since we assume that packages following semantic versioning rules.
For packages
+ // with a major version number that is 0 (implying that the dependency
is unstable),
+ // we use the full version identifier in the relocated path (e.g.
v0_minor_patch).
+ // For stable dependencies, if two or more packages use the same major
version number,
+ // we should bias to vendoring the highest version to minimize jar files
instead of
+ // vendoring using their minor or patch version numbers. Some packages
may be incompatible
+ // across minor or patch versions and in those instances we should
either attempt to update our
+ // usage of the dependency so we don't need to vendor both or choose to
vendor
+ // both specifying the minor version in the relocation path.
+
+ // To produce the list of necessary relocations, one needs to start with
a set of target
+ // packages that one wants to vendor, find all necessary transitive
dependencies of that
+ // set and provide relocations for each such that all necessary packages
and their
+ // dependencies are relocated. Any optional dependency that doesn't need
relocation
+ // must be excluded via an 'exclude' rule. There is additional
complexity of libraries that use
+ // JNI or reflection and have to be handled on case by case basis by
learning whether
+ // they support relocation and how would one go about doing it by
reading any documentation
+ // those libraries may provide. The
'validateShadedJarDoesntLeakNonOrgApacheBeamClasses'
+ // ensures that there are no classes outside of the 'org.apache.beam'
namespace.
+
+ // guava uses the com.google.common and com.google.thirdparty package
namespaces
+ relocate "com.google.common",
"org.apache.beam.vendor.guava.v20.com.google.common"
+ relocate "com.google.thirdparty",
"org.apache.beam.vendor.guava.v20.com.google.thirdparty"
+
+ relocate "com.google.protobuf",
"org.apache.beam.vendor.protobuf.v3.com.google.protobuf"
+ relocate "com.google.gson",
"org.apache.beam.vendor.gson.v2.com.google.gson"
+ relocate "io.grpc", "org.apache.beam.vendor.grpc.v1.io.grpc"
+ relocate "com.google.auth",
"org.apache.beam.vendor.google_auth_library_credentials.v0_9_1.com.google.auth"
+ relocate "com.google.api",
"org.apache.beam.vendor.proto_google_common_protos.v1.com.google.api"
+ relocate "com.google.cloud",
"org.apache.beam.vendor.proto_google_common_protos.v1.com.google.cloud"
+ relocate "com.google.logging",
"org.apache.beam.vendor.proto_google_common_protos.v1.com.google.logging"
+ relocate "com.google.longrunning",
"org.apache.beam.vendor.proto_google_common_protos.v1.com.google.longrunning"
+ relocate "com.google.rpc",
"org.apache.beam.vendor.proto_google_common_protos.v1.com.google.rpc"
+ relocate "com.google.type",
"org.apache.beam.vendor.proto_google_common_protos.v1.com.google.type"
+ relocate "io.opencensus",
"org.apache.beam.vendor.opencensus.v0_12_3.io.opencensus"
+
+ // Adapted from
https://github.com/grpc/grpc-java/blob/e283f70ad91f99c7fee8b31b605ef12a4f9b1690/netty/shaded/build.gradle#L41
+ relocate "io.netty", "org.apache.beam.vendor.netty.v4.io.netty"
+ // We have to be careful with these replacements as they must not match
any
+ // string in NativeLibraryLoader, else they cause corruption. Note that
+ // this includes concatenation of string literals and constants.
+ relocate 'META-INF/native/libnetty',
'META-INF/native/liborg_apache_beam_vendor_netty_v4_netty'
+ relocate 'META-INF/native/netty',
'META-INF/native/org_apache_beam_vendor_netty_v4_netty'
+
+ // Don't include errorprone, JDK8 annotations, objenesis, junit, and
mockito in the bundled jar
+ exclude "com/google/errorprone/**"
+ exclude "com/google/instrumentation/**"
+ exclude "javax/annotation/**"
+ exclude "junit/**"
+ exclude "org/hamcrest/**"
+ exclude "org/junit/**"
+ exclude "org/mockito/**"
+ exclude "org/objenesis/**"
+ }
+ project.ext.GRPC_V1_DEPENDENCIES_CLOSURE = {
+ compile 'com.google.guava:guava:20.0'
+ compile 'com.google.protobuf:protobuf-java:3.6.0'
+ compile 'com.google.protobuf:protobuf-java-util:3.6.0'
+ compile 'com.google.code.gson:gson:2.7'
+ compile 'io.grpc:grpc-auth:1.13.1'
+ compile 'io.grpc:grpc-core:1.13.1'
+ compile 'io.grpc:grpc-context:1.13.1'
+ compile 'io.grpc:grpc-netty:1.13.1'
+ compile 'io.grpc:grpc-protobuf:1.13.1'
+ compile 'io.grpc:grpc-stub:1.13.1'
+ compile 'io.netty:netty-transport-native-epoll:4.1.25.Final'
+ compile 'io.netty:netty-tcnative-boringssl-static:2.0.8.Final'
+ compile 'com.google.auth:google-auth-library-credentials:0.10.0'
+ compile 'io.grpc:grpc-testing:1.13.1'
+ compile 'com.google.api.grpc:proto-google-common-protos:1.12.0'
+ compile 'io.opencensus:opencensus-api:0.12.3'
+ compile 'io.opencensus:opencensus-contrib-grpc-metrics:0.12.3'
+ shadow 'com.google.errorprone:error_prone_annotations:2.1.2'
+ }
project.ext.applyPortabilityNature = {
println "applyPortabilityNature with " + (it ? "$it" : "default
configuration") + " for project $project.name"
- project.ext.applyJavaNature(enableFindbugs: false, shadowClosure: {
- // The relocation paths below specifically use the major version
number of the dependency
- // since we assume that packages following semantic versioning rules.
For packages
- // with a major version number that is 0 (implying that the dependency
is unstable),
- // we use the full version identifier in the relocated path (e.g.
v0_minor_patch).
- // For stable dependencies, if two or more packages use the same major
version number,
- // we should bias to vendoring the highest version to minimize jar
files instead of
- // vendoring using their minor or patch version numbers. Some packages
may be incompatible
- // across minor or patch versions and in those instances we should
either attempt to update our
- // usage of the dependency so we don't need to vendor both or choose
to vendor
- // both specifying the minor version in the relocation path.
-
- // To produce the list of necessary relocations, one needs to start
with a set of target
- // packages that one wants to vendor, find all necessary transitive
dependencies of that
- // set and provide relocations for each such that all necessary
packages and their
- // dependencies are relocated. Any optional dependency that doesn't
need relocation
- // must be excluded via an 'exclude' rule. There is additional
complexity of libraries that use
- // JNI or reflection and have to be handled on case by case basis by
learning whether
- // they support relocation and how would one go about doing it by
reading any documentation
- // those libraries may provide. The
'validateShadedJarDoesntLeakNonOrgApacheBeamClasses'
- // ensures that there are no classes outside of the 'org.apache.beam'
namespace.
-
- // guava uses the com.google.common and com.google.thirdparty package
namespaces
- relocate "com.google.common",
"org.apache.beam.vendor.guava.v20.com.google.common"
- relocate "com.google.thirdparty",
"org.apache.beam.vendor.guava.v20.com.google.thirdparty"
-
- relocate "com.google.protobuf",
"org.apache.beam.vendor.protobuf.v3.com.google.protobuf"
- relocate "com.google.gson",
"org.apache.beam.vendor.gson.v2.com.google.gson"
- relocate "io.grpc", "org.apache.beam.vendor.grpc.v1.io.grpc"
- relocate "com.google.auth",
"org.apache.beam.vendor.google_auth_library_credentials.v0_9_1.com.google.auth"
- relocate "com.google.api",
"org.apache.beam.vendor.proto_google_common_protos.v1.com.google.api"
- relocate "com.google.cloud",
"org.apache.beam.vendor.proto_google_common_protos.v1.com.google.cloud"
- relocate "com.google.logging",
"org.apache.beam.vendor.proto_google_common_protos.v1.com.google.logging"
- relocate "com.google.longrunning",
"org.apache.beam.vendor.proto_google_common_protos.v1.com.google.longrunning"
- relocate "com.google.rpc",
"org.apache.beam.vendor.proto_google_common_protos.v1.com.google.rpc"
- relocate "com.google.type",
"org.apache.beam.vendor.proto_google_common_protos.v1.com.google.type"
- relocate "io.opencensus",
"org.apache.beam.vendor.opencensus.v0_12_3.io.opencensus"
-
- // Adapted from
https://github.com/grpc/grpc-java/blob/e283f70ad91f99c7fee8b31b605ef12a4f9b1690/netty/shaded/build.gradle#L41
- relocate "io.netty", "org.apache.beam.vendor.netty.v4.io.netty"
- // We have to be careful with these replacements as they must not
match any
- // string in NativeLibraryLoader, else they cause corruption. Note that
- // this includes concatenation of string literals and constants.
- relocate 'META-INF/native/libnetty',
'META-INF/native/liborg_apache_beam_vendor_netty_v4_netty'
- relocate 'META-INF/native/netty',
'META-INF/native/org_apache_beam_vendor_netty_v4_netty'
-
- // Don't include errorprone, JDK8 annotations, objenesis, junit, and
mockito in the bundled jar
- exclude "com/google/errorprone/**"
- exclude "com/google/instrumentation/**"
- exclude "javax/annotation/**"
- exclude "junit/**"
- exclude "org/hamcrest/**"
- exclude "org/junit/**"
- exclude "org/mockito/**"
- exclude "org/objenesis/**"
+ project.ext.applyJavaNature(enableFindbugs: false, shadowClosure:
project.GRPC_V1_SHADOW_CLOSURE << {
+ // We perform all the code relocations but don't include
+ // any of the actual dependencies since they will be supplied
+ // by beam-vendor-java-grpc-v1
+ dependencies {
+ exclude(dependency(".*:.*"))
+ }
})
// Don't force modules here because we don't want to take the shared
declarations in build_rules.gradle
@@ -1404,28 +1435,22 @@ artifactId=${project.name}
}
}
- project.dependencies {
- compile 'com.google.guava:guava:20.0'
- compile 'com.google.protobuf:protobuf-java:3.6.0'
- compile 'com.google.protobuf:protobuf-java-util:3.6.0'
- compile 'com.google.code.gson:gson:2.7'
- compile 'io.grpc:grpc-auth:1.13.1'
- compile 'io.grpc:grpc-core:1.13.1'
- compile 'io.grpc:grpc-context:1.13.1'
- compile 'io.grpc:grpc-netty:1.13.1'
- compile 'io.grpc:grpc-protobuf:1.13.1'
- compile 'io.grpc:grpc-stub:1.13.1'
- compile 'io.netty:netty-transport-native-epoll:4.1.25.Final'
- compile 'io.netty:netty-tcnative-boringssl-static:2.0.8.Final'
- compile 'com.google.auth:google-auth-library-credentials:0.10.0'
- compile 'io.grpc:grpc-testing:1.13.1'
- compile 'com.google.api.grpc:proto-google-common-protos:1.12.0'
- compile 'io.opencensus:opencensus-api:0.12.3'
- compile 'io.opencensus:opencensus-contrib-grpc-metrics:0.12.3'
- shadow 'com.google.errorprone:error_prone_annotations:2.1.2'
+ project.dependencies project.GRPC_V1_DEPENDENCIES_CLOSURE << {
+ shadow it.project(path: ":beam-vendor-java-grpc-v1", configuration:
"shadow")
}
- // TODO(BEAM-4544): Integrate intellij support into this.
+ project.task('validateShadedJarDoesntExportVendoredDependencies',
dependsOn: 'shadowJar') {
+ inputs.files project.configurations.shadow.artifacts.files
+ doLast {
+ project.configurations.shadow.artifacts.files.each {
+ FileTree exportedClasses = project.zipTree(it).matching { include
"org/apache/beam/vendor/**" }
+ if (exportedClasses.files) {
+ throw new GradleException("$it exported classes inside of
org.apache.beam.vendor namespace: ${exportedClasses.files}")
+ }
+ }
+ }
+ }
+ project.tasks.check.dependsOn
project.tasks.validateShadedJarDoesntExportVendoredDependencies
}
/**
***********************************************************************************************/
diff --git a/runners/core-construction-java/build.gradle
b/runners/core-construction-java/build.gradle
index 826402dd735..834c12bd3b9 100644
--- a/runners/core-construction-java/build.gradle
+++ b/runners/core-construction-java/build.gradle
@@ -37,6 +37,7 @@ dependencies {
shadow project(path: ":beam-model-pipeline", configuration: "shadow")
shadow project(path: ":beam-model-job-management", configuration: "shadow")
shadow project(path: ":beam-sdks-java-core", configuration: "shadow")
+ shadow project(path: ":beam-vendor-java-grpc-v1", configuration: "shadow")
shadow library.java.jackson_core
shadow library.java.jackson_databind
shadow library.java.joda_time
diff --git a/runners/direct-java/build.gradle b/runners/direct-java/build.gradle
index b13426a1f3a..64b0b2c4e6b 100644
--- a/runners/direct-java/build.gradle
+++ b/runners/direct-java/build.gradle
@@ -64,6 +64,7 @@ dependencies {
compile project(path: it, configuration: "shadow")
}
shadow project(path: ":beam-sdks-java-core", configuration: "shadow")
+ shadow project(path: ":beam-vendor-java-grpc-v1", configuration: "shadow")
shadow library.java.joda_time
shadow library.java.slf4j_api
shadow library.java.args4j
diff --git a/runners/flink/build.gradle b/runners/flink/build.gradle
index c2e251ff5d9..ecf66d47ec4 100644
--- a/runners/flink/build.gradle
+++ b/runners/flink/build.gradle
@@ -54,6 +54,7 @@ dependencies {
shadow project(path: ":beam-runners-core-java", configuration: "shadow")
shadow project(path: ":beam-runners-core-construction-java", configuration:
"shadow")
shadow project(path: ":beam-runners-java-fn-execution", configuration:
"shadow")
+ shadow project(path: ":beam-vendor-java-grpc-v1", configuration: "shadow")
shadow library.java.jackson_annotations
shadow library.java.slf4j_api
shadow library.java.joda_time
diff --git a/runners/google-cloud-dataflow-java/build.gradle
b/runners/google-cloud-dataflow-java/build.gradle
index ebe9dcd1344..3014cd79f26 100644
--- a/runners/google-cloud-dataflow-java/build.gradle
+++ b/runners/google-cloud-dataflow-java/build.gradle
@@ -61,6 +61,7 @@ dependencies {
shadow project(path:
":beam-sdks-java-extensions-google-cloud-platform-core", configuration:
"shadow")
shadow project(path: ":beam-sdks-java-io-google-cloud-platform",
configuration: "shadow")
shadow project(path: ":beam-runners-core-construction-java", configuration:
"shadow")
+ shadow project(path: ":beam-vendor-java-grpc-v1", configuration: "shadow")
shadow library.java.google_api_client
shadow library.java.google_http_client
shadow library.java.google_http_client_jackson2
diff --git a/runners/google-cloud-dataflow-java/worker/build.gradle
b/runners/google-cloud-dataflow-java/worker/build.gradle
index 2f6e090c0a7..356d8fc266d 100644
--- a/runners/google-cloud-dataflow-java/worker/build.gradle
+++ b/runners/google-cloud-dataflow-java/worker/build.gradle
@@ -89,6 +89,7 @@ def common_compile_project_dependencies = [
":beam-runners-java-fn-execution",
":beam-sdks-java-fn-execution",
":beam-runners-google-cloud-dataflow-java-windmill",
+ ":beam-vendor-java-grpc-v1",
]
def common_test_compile_project_dependencies = [
diff --git
a/runners/google-cloud-dataflow-java/worker/legacy-worker/build.gradle
b/runners/google-cloud-dataflow-java/worker/legacy-worker/build.gradle
index a4234442714..02a9c442b01 100644
--- a/runners/google-cloud-dataflow-java/worker/legacy-worker/build.gradle
+++ b/runners/google-cloud-dataflow-java/worker/legacy-worker/build.gradle
@@ -156,6 +156,7 @@ def common_compile_project_dependencies = [
":beam-runners-java-fn-execution",
":beam-sdks-java-fn-execution",
":beam-runners-google-cloud-dataflow-java-windmill",
+ ":beam-vendor-java-grpc-v1",
]
def common_test_compile_project_dependencies = [
diff --git a/runners/java-fn-execution/build.gradle
b/runners/java-fn-execution/build.gradle
index d4a25fa25e5..f54dc764b90 100644
--- a/runners/java-fn-execution/build.gradle
+++ b/runners/java-fn-execution/build.gradle
@@ -30,6 +30,7 @@ dependencies {
shadow project(path: ":beam-sdks-java-fn-execution", configuration: "shadow")
shadow project(path: ":beam-runners-core-construction-java", configuration:
"shadow")
shadow project(path: ":beam-vendor-sdks-java-extensions-protobuf",
configuration: "shadow")
+ shadow project(path: ":beam-vendor-java-grpc-v1", configuration: "shadow")
shadow library.java.slf4j_api
testCompile project(":beam-sdks-java-harness")
testCompile project(path: ":beam-runners-core-construction-java",
configuration: "shadow")
diff --git a/runners/reference/java/build.gradle
b/runners/reference/java/build.gradle
index 932a788b25f..1aaf6e9890c 100644
--- a/runners/reference/java/build.gradle
+++ b/runners/reference/java/build.gradle
@@ -34,6 +34,7 @@ dependencies {
shadow project(path: ":beam-model-pipeline", configuration: "shadow")
shadow project(path: ":beam-runners-core-construction-java", configuration:
"shadow")
shadow project(path: ":beam-sdks-java-fn-execution", configuration: "shadow")
+ shadow project(path: ":beam-vendor-java-grpc-v1", configuration: "shadow")
shadow library.java.slf4j_api
shadowTest project(path: ":beam-runners-core-construction-java",
configuration: "shadowTest")
shadowTest library.java.guava
diff --git a/sdks/java/fn-execution/build.gradle
b/sdks/java/fn-execution/build.gradle
index 4e3a0203a59..80dcefac13d 100644
--- a/sdks/java/fn-execution/build.gradle
+++ b/sdks/java/fn-execution/build.gradle
@@ -28,6 +28,7 @@ dependencies {
shadow project(path: ":beam-model-pipeline", configuration: "shadow")
shadow project(path: ":beam-model-fn-execution", configuration: "shadow")
shadow project(path: ":beam-sdks-java-core", configuration: "shadow")
+ shadow project(path: ":beam-vendor-java-grpc-v1", configuration: "shadow")
shadow library.java.slf4j_api
shadow library.java.joda_time
provided library.java.junit
diff --git a/sdks/java/harness/build.gradle b/sdks/java/harness/build.gradle
index 83cc4be1576..69f0ae0825f 100644
--- a/sdks/java/harness/build.gradle
+++ b/sdks/java/harness/build.gradle
@@ -23,7 +23,8 @@
def dependOnProjects = [":beam-model-pipeline", ":beam-model-fn-execution",
":beam-sdks-java-core",
":beam-sdks-java-fn-execution",
":beam-sdks-java-extensions-google-cloud-platform-core",
- ":beam-runners-core-java",
":beam-runners-core-construction-java"]
+ ":beam-runners-core-java",
":beam-runners-core-construction-java",
+ ":beam-vendor-java-grpc-v1",]
apply plugin: org.apache.beam.gradle.BeamModulePlugin
applyJavaNature(validateShadowJar: false, shadowClosure:
DEFAULT_SHADOW_CLOSURE <<
diff --git a/settings.gradle b/settings.gradle
index 0d83a3828c4..1e88ccdf92c 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -178,6 +178,8 @@ include "beam-sdks-python-container"
project(":beam-sdks-python-container").dir = file("sdks/python/container")
include "beam-sdks-python-container-py3"
project(":beam-sdks-python-container-py3").dir =
file("sdks/python/container/py3")
+include "beam-vendor-java-grpc-v1"
+project(":beam-vendor-java-grpc-v1").dir = file("vendor/java-grpc-v1")
include "beam-vendor-sdks-java-extensions-protobuf"
project(":beam-vendor-sdks-java-extensions-protobuf").dir =
file("vendor/sdks-java-extensions-protobuf")
include "beam-website"
@@ -187,4 +189,4 @@
project(":beam-runners-google-cloud-dataflow-java-legacy-worker").dir = file("ru
include "beam-runners-google-cloud-dataflow-java-fn-api-worker"
project(":beam-runners-google-cloud-dataflow-java-fn-api-worker").dir =
file("runners/google-cloud-dataflow-java/worker")
include "beam-runners-google-cloud-dataflow-java-windmill"
-project(":beam-runners-google-cloud-dataflow-java-windmill").dir =
file("runners/google-cloud-dataflow-java/worker/windmill")
\ No newline at end of file
+project(":beam-runners-google-cloud-dataflow-java-windmill").dir =
file("runners/google-cloud-dataflow-java/worker/windmill")
diff --git a/vendor/java-grpc-v1/build.gradle b/vendor/java-grpc-v1/build.gradle
new file mode 100644
index 00000000000..1ea790332e7
--- /dev/null
+++ b/vendor/java-grpc-v1/build.gradle
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * License); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+description = "Apache Beam :: Vendored Dependencies :: Java :: gRPC :: v1"
+ext.summary = "Add support to Apache Beam for Vendored gRPC V1."
+
+apply plugin: org.apache.beam.gradle.BeamModulePlugin
+applyJavaNature(enableFindbugs: false, shadowClosure: GRPC_V1_SHADOW_CLOSURE)
+
+// Don't force modules here because we don't want to take the shared
declarations in build_rules.gradle
+// because we would like to have the freedom to choose which versions of
dependencies we
+// are using for the portability APIs separate from what is being used inside
other modules such as GCP.
+configurations.all { config ->
+ config.resolutionStrategy { forcedModules = []}
+}
+
+dependencies GRPC_V1_DEPENDENCIES_CLOSURE
+
+// TODO(BEAM-4544): Integrate intellij support into this.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 156135)
Time Spent: 1h 50m (was: 1h 40m)
> Vendor gRPC and Protobuf separately from beam-model-* Java packages
> -------------------------------------------------------------------
>
> Key: BEAM-5366
> URL: https://issues.apache.org/jira/browse/BEAM-5366
> Project: Beam
> Issue Type: Improvement
> Components: beam-model, build-system
> Reporter: Luke Cwik
> Assignee: Luke Cwik
> Priority: Minor
> Time Spent: 1h 50m
> Remaining Estimate: 0h
>
> Each of the beam-model-* jars currently contains duplicate definitions of
> gRPC and protobuf and their transitive dependencies.
>
> By migrating those packages to a separate artifact, we could have a single
> copy of those classes instead of 3.
>
> This would reduce the size of the jars and prevent warnings such as:
>
> {code:java}
> [WARNING] beam-model-fn-execution-2.5.0.jar,
> beam-model-job-management-2.5.0.jar, beam-model-pipeline-2.5.0.jar define
> 6660 overlapping classes: [WARNING] -
> org.apache.beam.vendor.netty.v4.io.netty.handler.codec.http.HttpClientCodec$1
> [WARNING] -
> org.apache.beam.vendor.guava.v20.com.google.common.util.concurrent.AggregateFutureState$SafeAtomicHelper
> [WARNING] -
> org.apache.beam.vendor.netty.v4.io.netty.util.concurrent.DefaultFutureListeners
> [WARNING] -
> org.apache.beam.vendor.netty.v4.io.netty.handler.ssl.OpenSslSessionContext$1
> [WARNING] -
> org.apache.beam.vendor.netty.v4.io.netty.handler.ssl.Java9SslUtils$4
> [WARNING] -
> org.apache.beam.vendor.guava.v20.com.google.common.collect.ImmutableMultimap$Builder
> [WARNING] -
> org.apache.beam.vendor.netty.v4.io.netty.handler.codec.spdy.SpdyHeaders
> [WARNING] -
> org.apache.beam.vendor.protobuf.v3.com.google.protobuf.DescriptorProtos$FieldDescriptorProtoOrBuilder
> [WARNING] -
> org.apache.beam.vendor.guava.v20.com.google.common.collect.AbstractMultimap
> [WARNING] -
> org.apache.beam.vendor.guava.v20.com.google.common.io.BaseEncoding$3{code}
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)