YARN-11657. Remove protobuf-2.5 from hadoop-yarn-api module (#6575) (#6580)

The import of protobuf-java-2.5 in the hadoop-yarn-api module
is downgraded from "compile" to "provided"

This removes it from share/hadoop/yarn/lib/protobuf-java-2.5.0.jar

It is still found under
share/hadoop/yarn/timelineservice/lib/protobuf-java-2.5.0.jar

Contributed by Steve Loughran
This commit is contained in:
Steve Loughran 2024-03-05 11:01:14 +00:00 committed by GitHub
parent d974a12f39
commit dae871e3e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 11 additions and 14 deletions

View File

@ -315,12 +315,12 @@ Controlling the redistribution of the protobuf-2.5 dependency
The protobuf 2.5.0 library is used at compile time to compile the class The protobuf 2.5.0 library is used at compile time to compile the class
org.apache.hadoop.ipc.ProtobufHelper; this class known to have been used by org.apache.hadoop.ipc.ProtobufHelper; this class known to have been used by
external projects in the past. Protobuf 2.5 is not used elsewhere in external projects in the past. Protobuf 2.5 is not used directly in
the Hadoop codebase; alongside the move to Protobuf 3.x a private successor the Hadoop codebase; alongside the move to Protobuf 3.x a private successor
class, org.apache.hadoop.ipc.internal.ShadedProtobufHelper is now used. class, org.apache.hadoop.ipc.internal.ShadedProtobufHelper is now used.
The hadoop-common module no longer exports its compile-time dependency on The hadoop-common module no longer exports its compile-time dependency on
protobuf-2.5. Hadoop distributions no longer include it. protobuf-java-2.5.
Any application declaring a dependency on hadoop-commmon will no longer get Any application declaring a dependency on hadoop-commmon will no longer get
the artifact added to their classpath. the artifact added to their classpath.
If is still required, then they must explicitly declare it: If is still required, then they must explicitly declare it:
@ -337,10 +337,14 @@ Controlling the redistribution of the protobuf-2.5 dependency
-Dcommon.protobuf2.scope=compile -Dcommon.protobuf2.scope=compile
If this is done then protobuf-2.5.0.jar will again be exported as a If this is done then protobuf-java-2.5.0.jar will again be exported as a
hadoop-common dependency, and included in the share/hadoop/common/lib/ hadoop-common dependency, and included in the share/hadoop/common/lib/
directory of any Hadoop distribution built. directory of any Hadoop distribution built.
Note that protobuf-java-2.5.0.jar is still placed in
share/hadoop/yarn/timelineservice/lib; this is needed by the hbase client
library.
---------------------------------------------------------------------------------- ----------------------------------------------------------------------------------
Building components separately Building components separately

View File

@ -395,9 +395,10 @@ hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/d3.v3.js
hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/d3-3.5.17.min.js hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/d3-3.5.17.min.js
leveldb v1.13 leveldb v1.13
com.google.protobuf:protobuf-java:3.6.1 com.google.protobuf:protobuf-java:2.5.0
com.google.protobuf:protobuf-java:3.21.12
com.google.re2j:re2j:1.1 com.google.re2j:re2j:1.1
com.jcraft:jsch:0.1.54 com.jcraft:jsch:0.1.55
com.thoughtworks.paranamer:paranamer:2.3 com.thoughtworks.paranamer:paranamer:2.3
jakarta.activation:jakarta.activation-api:1.2.1 jakarta.activation:jakarta.activation-api:1.2.1
org.fusesource.leveldbjni:leveldbjni-all:1.8 org.fusesource.leveldbjni:leveldbjni-all:1.8

View File

@ -62,11 +62,6 @@
<artifactId>hadoop-annotations</artifactId> <artifactId>hadoop-annotations</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.apache.hadoop.thirdparty</groupId> <groupId>org.apache.hadoop.thirdparty</groupId>
<artifactId>hadoop-shaded-protobuf_3_21</artifactId> <artifactId>hadoop-shaded-protobuf_3_21</artifactId>

View File

@ -72,6 +72,7 @@
<dependency> <dependency>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId> <artifactId>protobuf-java</artifactId>
<scope>${transient.protobuf2.scope}</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>

View File

@ -112,10 +112,6 @@
<groupId>com.google.inject.extensions</groupId> <groupId>com.google.inject.extensions</groupId>
<artifactId>guice-servlet</artifactId> <artifactId>guice-servlet</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
</dependency>
<dependency> <dependency>
<groupId>io.dropwizard.metrics</groupId> <groupId>io.dropwizard.metrics</groupId>