Skip to content

Commit 7dac7e1

Browse files
authored
HADOOP-16596. [pb-upgrade] Use shaded protobuf classes from hadoop-thirdparty dependency (#1635). Contributed by Vinayakumar B.
1 parent 5944d28 commit 7dac7e1

File tree

425 files changed

+1037
-514
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

425 files changed

+1037
-514
lines changed

hadoop-common-project/hadoop-common/pom.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939

4040

4141
<dependencies>
42+
<dependency>
43+
<groupId>org.apache.hadoop.thirdparty</groupId>
44+
<artifactId>hadoop-shaded-protobuf_3_7</artifactId>
45+
</dependency>
4246
<dependency>
4347
<groupId>org.apache.hadoop</groupId>
4448
<artifactId>hadoop-annotations</artifactId>
@@ -394,6 +398,36 @@
394398
</execution>
395399
</executions>
396400
</plugin>
401+
<plugin>
402+
<groupId>com.google.code.maven-replacer-plugin</groupId>
403+
<artifactId>replacer</artifactId>
404+
<executions>
405+
<execution>
406+
<id>replace-generated-sources</id>
407+
<configuration>
408+
<skip>false</skip>
409+
</configuration>
410+
</execution>
411+
<execution>
412+
<id>replace-generated-test-sources</id>
413+
<configuration>
414+
<skip>false</skip>
415+
</configuration>
416+
</execution>
417+
<execution>
418+
<id>replace-sources</id>
419+
<configuration>
420+
<skip>false</skip>
421+
</configuration>
422+
</execution>
423+
<execution>
424+
<id>replace-test-sources</id>
425+
<configuration>
426+
<skip>false</skip>
427+
</configuration>
428+
</execution>
429+
</executions>
430+
</plugin>
397431
<plugin>
398432
<groupId>org.apache.hadoop</groupId>
399433
<artifactId>hadoop-maven-plugins</artifactId>
@@ -856,6 +890,7 @@
856890
<groupId>org.apache.maven.plugins</groupId>
857891
<artifactId>maven-surefire-plugin</artifactId>
858892
<configuration>
893+
<testFailureIgnore>${ignoreTestFailure}</testFailureIgnore>
859894
<forkCount>${testsThreadCount}</forkCount>
860895
<reuseForks>false</reuseForks>
861896
<argLine>${maven-surefire-plugin.argLine} -DminiClusterDedicatedDirs=true</argLine>

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/LocalFileSystemPathHandle.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
package org.apache.hadoop.fs;
1818

19-
import com.google.protobuf.ByteString;
19+
import org.apache.hadoop.thirdparty.protobuf.ByteString;
2020
import org.apache.hadoop.fs.FSProtos.LocalFileSystemPathHandleProto;
2121

2222
import java.io.IOException;

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFCRpcServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import org.apache.hadoop.security.AccessControlException;
3434
import org.apache.hadoop.security.authorize.PolicyProvider;
3535

36-
import com.google.protobuf.BlockingService;
36+
import org.apache.hadoop.thirdparty.protobuf.BlockingService;
3737

3838
@InterfaceAudience.LimitedPrivate("HDFS")
3939
@InterfaceStability.Evolving

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/protocolPB/HAServiceProtocolClientSideTranslatorPB.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
import org.apache.hadoop.ipc.RPC;
4444
import org.apache.hadoop.security.UserGroupInformation;
4545

46-
import com.google.protobuf.RpcController;
47-
import com.google.protobuf.ServiceException;
46+
import org.apache.hadoop.thirdparty.protobuf.RpcController;
47+
import org.apache.hadoop.thirdparty.protobuf.ServiceException;
4848

4949
/**
5050
* This class is the client side translator to translate the requests made on

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/protocolPB/HAServiceProtocolServerSideTranslatorPB.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
import org.apache.hadoop.ipc.ProtocolSignature;
4141
import org.apache.hadoop.ipc.RPC;
4242

43-
import com.google.protobuf.RpcController;
44-
import com.google.protobuf.ServiceException;
43+
import org.apache.hadoop.thirdparty.protobuf.RpcController;
44+
import org.apache.hadoop.thirdparty.protobuf.ServiceException;
4545
import org.slf4j.Logger;
4646
import org.slf4j.LoggerFactory;
4747

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/protocolPB/ZKFCProtocolClientSideTranslatorPB.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
import org.apache.hadoop.security.AccessControlException;
3535
import org.apache.hadoop.security.UserGroupInformation;
3636

37-
import com.google.protobuf.RpcController;
38-
import com.google.protobuf.ServiceException;
37+
import org.apache.hadoop.thirdparty.protobuf.RpcController;
38+
import org.apache.hadoop.thirdparty.protobuf.ServiceException;
3939

4040

4141
public class ZKFCProtocolClientSideTranslatorPB implements

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/protocolPB/ZKFCProtocolServerSideTranslatorPB.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
import org.apache.hadoop.ipc.ProtocolSignature;
3030
import org.apache.hadoop.ipc.RPC;
3131

32-
import com.google.protobuf.RpcController;
33-
import com.google.protobuf.ServiceException;
32+
import org.apache.hadoop.thirdparty.protobuf.RpcController;
33+
import org.apache.hadoop.thirdparty.protobuf.ServiceException;
3434

3535
@InterfaceAudience.Private
3636
@InterfaceStability.Stable

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/ObjectWritable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import org.apache.hadoop.conf.*;
3131
import org.apache.hadoop.util.ProtoUtil;
3232

33-
import com.google.protobuf.Message;
33+
import org.apache.hadoop.thirdparty.protobuf.Message;
3434

3535
/** A polymorphic Writable that writes an instance with it's class name.
3636
* Handles arrays, strings and primitive types without a Writable wrapper.

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/retry/RetryUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import org.apache.hadoop.io.retry.RetryPolicies.MultipleLinearRandomRetry;
2424
import org.apache.hadoop.ipc.RemoteException;
2525

26-
import com.google.protobuf.ServiceException;
26+
import org.apache.hadoop.thirdparty.protobuf.ServiceException;
2727
import org.apache.hadoop.ipc.RetriableException;
2828
import org.slf4j.Logger;
2929
import org.slf4j.LoggerFactory;

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/ProtobufHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
import org.apache.hadoop.security.token.Token;
2727
import org.apache.hadoop.security.token.TokenIdentifier;
2828

29-
import com.google.protobuf.ByteString;
30-
import com.google.protobuf.ServiceException;
29+
import org.apache.hadoop.thirdparty.protobuf.ByteString;
30+
import org.apache.hadoop.thirdparty.protobuf.ServiceException;
3131

3232
/**
3333
* Helper methods for protobuf related RPC implementation

0 commit comments

Comments
 (0)