HADOOP-18487. protobuf 2.5 marked as provided.
The option protobuf.scope defines whether the protobuf 2.5.0 dependency is marked as provided or not. * all declarations except those in yarn-csi are updated * those modules which don't compile without their own explicit import (hadoop-hdfs-client, hadoop-hdfs-rbf) It's actually interesting to see where/how that compile fails hadoop-hdfs-client: ClientNamenodeProtocolTranslatorPB hadoop-hdfs-rbf:RouterAdminProtocolTranslatorPB both with "class file for com.google.protobuf.ServiceException not found", even though *neither class uses it* what they do have is references to ProtobufHelper.getRemoteException(), which is overloaded to both the shaded ServiceException and the original one Hypothesis: the javac overload resolution needs to look at the entire class hierarchy before it can decide which one to use. Proposed: add a new method ioe extractException(org.apache.hadoop.thirdparty.protobuf.ServiceException) and move our own code to it. Without the overloading the classes should not be needed Change-Id: I70354abfe3f1fdc03c418dac88e60f8cc4929a33
This commit is contained in:
parent
2a0dc2ab2f
commit
91acb8da23
|
@ -254,7 +254,7 @@
|
|||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<scope>compile</scope>
|
||||
<scope>${protobuf.scope}</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
|
|
|
@ -71,6 +71,11 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<scope>${protobuf.scope}</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
|
|
|
@ -146,7 +146,7 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<scope>compile</scope>
|
||||
<scope>${protobuf.scope}</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
|
|
|
@ -76,6 +76,11 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||
<artifactId>hadoop-federation-balance</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<scope>${protobuf.scope}</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
|
|
|
@ -130,7 +130,7 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<scope>compile</scope>
|
||||
<scope>${protobuf.scope}</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<scope>${protobuf.scope}</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.avro</groupId>
|
||||
|
|
|
@ -86,6 +86,8 @@
|
|||
|
||||
<!--Protobuf version for backward compatibility-->
|
||||
<protobuf.version>2.5.0</protobuf.version>
|
||||
<protobuf.scope>provided</protobuf.scope>
|
||||
|
||||
<!-- ProtocolBuffer version, actually used in Hadoop -->
|
||||
<hadoop.protobuf.version>3.7.1</hadoop.protobuf.version>
|
||||
<protoc.path>${env.HADOOP_PROTOC_PATH}</protoc.path>
|
||||
|
|
|
@ -191,6 +191,7 @@
|
|||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<scope>${protobuf.scope}</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
@ -132,6 +132,7 @@
|
|||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<scope>${protobuf.scope}</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<version>${hadoop.protobuf.version}</version>
|
||||
<scope>${protobuf.scope}</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<scope>${protobuf.scope}</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
|
|
|
@ -81,6 +81,7 @@
|
|||
<dependency>
|
||||
<groupId>com.google.protobuf</groupId>
|
||||
<artifactId>protobuf-java</artifactId>
|
||||
<scope>${protobuf.scope}</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
|
|
Loading…
Reference in New Issue