Skip to content

Commit dae871e

Browse files
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
1 parent d974a12 commit dae871e

File tree

5 files changed

+11
-14
lines changed

5 files changed

+11
-14
lines changed

BUILDING.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,12 @@ Controlling the redistribution of the protobuf-2.5 dependency
315315

316316
The protobuf 2.5.0 library is used at compile time to compile the class
317317
org.apache.hadoop.ipc.ProtobufHelper; this class known to have been used by
318-
external projects in the past. Protobuf 2.5 is not used elsewhere in
318+
external projects in the past. Protobuf 2.5 is not used directly in
319319
the Hadoop codebase; alongside the move to Protobuf 3.x a private successor
320320
class, org.apache.hadoop.ipc.internal.ShadedProtobufHelper is now used.
321321

322322
The hadoop-common module no longer exports its compile-time dependency on
323-
protobuf-2.5. Hadoop distributions no longer include it.
323+
protobuf-java-2.5.
324324
Any application declaring a dependency on hadoop-commmon will no longer get
325325
the artifact added to their classpath.
326326
If is still required, then they must explicitly declare it:
@@ -337,10 +337,14 @@ Controlling the redistribution of the protobuf-2.5 dependency
337337

338338
-Dcommon.protobuf2.scope=compile
339339

340-
If this is done then protobuf-2.5.0.jar will again be exported as a
340+
If this is done then protobuf-java-2.5.0.jar will again be exported as a
341341
hadoop-common dependency, and included in the share/hadoop/common/lib/
342342
directory of any Hadoop distribution built.
343343

344+
Note that protobuf-java-2.5.0.jar is still placed in
345+
share/hadoop/yarn/timelineservice/lib; this is needed by the hbase client
346+
library.
347+
344348
----------------------------------------------------------------------------------
345349
Building components separately
346350

LICENSE-binary

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,10 @@ hadoop-tools/hadoop-sls/src/main/html/js/thirdparty/d3.v3.js
395395
hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/static/d3-3.5.17.min.js
396396
leveldb v1.13
397397

398-
com.google.protobuf:protobuf-java:3.6.1
398+
com.google.protobuf:protobuf-java:2.5.0
399+
com.google.protobuf:protobuf-java:3.21.12
399400
com.google.re2j:re2j:1.1
400-
com.jcraft:jsch:0.1.54
401+
com.jcraft:jsch:0.1.55
401402
com.thoughtworks.paranamer:paranamer:2.3
402403
jakarta.activation:jakarta.activation-api:1.2.1
403404
org.fusesource.leveldbjni:leveldbjni-all:1.8

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@
6262
<artifactId>hadoop-annotations</artifactId>
6363
</dependency>
6464

65-
<dependency>
66-
<groupId>com.google.protobuf</groupId>
67-
<artifactId>protobuf-java</artifactId>
68-
</dependency>
69-
7065
<dependency>
7166
<groupId>org.apache.hadoop.thirdparty</groupId>
7267
<artifactId>hadoop-shaded-protobuf_3_21</artifactId>

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-applicationhistoryservice/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
<dependency>
7373
<groupId>com.google.protobuf</groupId>
7474
<artifactId>protobuf-java</artifactId>
75+
<scope>${transient.protobuf2.scope}</scope>
7576
</dependency>
7677
<dependency>
7778
<groupId>junit</groupId>

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,6 @@
112112
<groupId>com.google.inject.extensions</groupId>
113113
<artifactId>guice-servlet</artifactId>
114114
</dependency>
115-
<dependency>
116-
<groupId>com.google.protobuf</groupId>
117-
<artifactId>protobuf-java</artifactId>
118-
</dependency>
119115

120116
<dependency>
121117
<groupId>io.dropwizard.metrics</groupId>

0 commit comments

Comments
 (0)