hadoop/protobuf3.patch

32 lines
1.7 KiB
Diff

--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/ProtobufRpcEngine.java 2016-12-20 15:18:20.683682746 -0500
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/ProtobufRpcEngine.java 2016-12-20 15:18:10.496932909 -0500
@@ -53,7 +53,7 @@
import com.google.protobuf.BlockingService;
import com.google.protobuf.CodedOutputStream;
import com.google.protobuf.Descriptors.MethodDescriptor;
-import com.google.protobuf.GeneratedMessage;
+import com.google.protobuf.GeneratedMessageV3;
import com.google.protobuf.Message;
import com.google.protobuf.ServiceException;
import com.google.protobuf.TextFormat;
@@ -281,7 +281,7 @@
* Protobuf. Several methods on {@link org.apache.hadoop.ipc.Server and RPC}
* use type Writable as a wrapper to work across multiple RpcEngine kinds.
*/
- private static abstract class RpcMessageWithHeader<T extends GeneratedMessage>
+ private static abstract class RpcMessageWithHeader<T extends GeneratedMessageV3>
implements RpcWrapper {
T requestHeader;
Message theRequest; // for clientSide, the request is here
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormatProtobuf.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormatProtobuf.java
@@ -584,7 +584,7 @@ private SectionName(String name) {
}
}
- private static int getOndiskTrunkSize(com.google.protobuf.GeneratedMessage s) {
+ private static int getOndiskTrunkSize(com.google.protobuf.GeneratedMessageV3 s) {
return CodedOutputStream.computeRawVarint32Size(s.getSerializedSize())
+ s.getSerializedSize();
}