[15/37] hadoop git commit: HADOOP-10729. Add tests for PB RPC in case version mismatch of client and server. Contributed by Junping Du.
HADOOP-10729. Add tests for PB RPC in case version mismatch of client and server. Contributed by Junping Du. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/c4084d9b Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/c4084d9b Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/c4084d9b Branch: refs/heads/yarn-2877 Commit: c4084d9bc3b5c20405d9da6623b330d5720b64a1 Parents: 832b3cb Author: Haohui Mai Authored: Wed Dec 9 05:41:44 2015 +0800 Committer: Haohui Mai Committed: Wed Dec 9 05:41:44 2015 +0800 -- hadoop-common-project/hadoop-common/CHANGES.txt | 3 + .../ipc/TestProtoBufRPCCompatibility.java | 178 +++ .../hadoop-common/src/test/proto/test.proto | 8 + .../src/test/proto/test_rpc_service.proto | 15 ++ 4 files changed, 204 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/c4084d9b/hadoop-common-project/hadoop-common/CHANGES.txt -- diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index e7da77b..4cd295e 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -1497,6 +1497,9 @@ Release 2.8.0 - UNRELEASED HADOOP-12609. Fix intermittent failure of TestDecayRpcScheduler. (Masatake Iwasaki via Arpit Agarwal) +HADOOP-10729. Add tests for PB RPC in case version mismatch of client and +server. (Junping Du via wheat9) + Release 2.7.3 - UNRELEASED INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/hadoop/blob/c4084d9b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestProtoBufRPCCompatibility.java -- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestProtoBufRPCCompatibility.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestProtoBufRPCCompatibility.java new file mode 100644 index 000..76a93cf --- /dev/null +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestProtoBufRPCCompatibility.java @@ -0,0 +1,178 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.ipc; + +import static org.junit.Assert.fail; + +import java.io.IOException; +import java.net.InetSocketAddress; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.CommonConfigurationKeys; + +import org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.OptRequestProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.OptResponseProto; + +import org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.OldProtobufRpcProto; +import org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.NewProtobufRpcProto; +import org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.NewerProtobufRpcProto; +import org.apache.hadoop.net.NetUtils; +import org.junit.Assert; +import org.junit.Test; + +import com.google.protobuf.BlockingService; +import com.google.protobuf.RpcController; +import com.google.protobuf.ServiceException; + +public class TestProtoBufRPCCompatibility { + + private static final String ADDRESS = "0.0.0.0"; + public final static int PORT = 0; + private static InetSocketAddress addr; + private static RPC.Server server; + private static Configuration conf; + + @ProtocolInfo(protocolName = "testProto", protocolVersion = 1) + public interface OldRpcService extends + OldProtobufRpcProto.BlockingInterface { + } + + @ProtocolInfo(protocolName = "testProto", protocolVersion = 2) + public interface NewRpcService extends + NewProtobufRpcProto.BlockingInterface { + } + + @ProtocolInfo(protoc
hadoop git commit: HADOOP-10729. Add tests for PB RPC in case version mismatch of client and server. Contributed by Junping Du.
Repository: hadoop Updated Branches: refs/heads/branch-2.8 3d100163d -> 274af9b57 HADOOP-10729. Add tests for PB RPC in case version mismatch of client and server. Contributed by Junping Du. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/274af9b5 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/274af9b5 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/274af9b5 Branch: refs/heads/branch-2.8 Commit: 274af9b5798b051c4d0e2912af553a02b71afe0c Parents: 3d10016 Author: Haohui Mai Authored: Wed Dec 9 05:41:44 2015 +0800 Committer: Haohui Mai Committed: Wed Dec 9 05:44:36 2015 +0800 -- hadoop-common-project/hadoop-common/CHANGES.txt | 3 + .../ipc/TestProtoBufRPCCompatibility.java | 178 +++ .../hadoop-common/src/test/proto/test.proto | 8 + .../src/test/proto/test_rpc_service.proto | 15 ++ 4 files changed, 204 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/274af9b5/hadoop-common-project/hadoop-common/CHANGES.txt -- diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 6c6ba75..04b16b9 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -863,6 +863,9 @@ Release 2.8.0 - UNRELEASED HADOOP-12609. Fix intermittent failure of TestDecayRpcScheduler. (Masatake Iwasaki via Arpit Agarwal) +HADOOP-10729. Add tests for PB RPC in case version mismatch of client and +server. (Junping Du via wheat9) + Release 2.7.3 - UNRELEASED INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/hadoop/blob/274af9b5/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestProtoBufRPCCompatibility.java -- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestProtoBufRPCCompatibility.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestProtoBufRPCCompatibility.java new file mode 100644 index 000..76a93cf --- /dev/null +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestProtoBufRPCCompatibility.java @@ -0,0 +1,178 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.ipc; + +import static org.junit.Assert.fail; + +import java.io.IOException; +import java.net.InetSocketAddress; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.CommonConfigurationKeys; + +import org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.OptRequestProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.OptResponseProto; + +import org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.OldProtobufRpcProto; +import org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.NewProtobufRpcProto; +import org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.NewerProtobufRpcProto; +import org.apache.hadoop.net.NetUtils; +import org.junit.Assert; +import org.junit.Test; + +import com.google.protobuf.BlockingService; +import com.google.protobuf.RpcController; +import com.google.protobuf.ServiceException; + +public class TestProtoBufRPCCompatibility { + + private static final String ADDRESS = "0.0.0.0"; + public final static int PORT = 0; + private static InetSocketAddress addr; + private static RPC.Server server; + private static Configuration conf; + + @ProtocolInfo(protocolName = "testProto", protocolVersion = 1) + public interface OldRpcService extends + OldProtobufRpcProto.BlockingInterface { + } + + @ProtocolInfo(protocolName = "testProto", protocolVersion = 2) + public interface NewRpcService
hadoop git commit: HADOOP-10729. Add tests for PB RPC in case version mismatch of client and server. Contributed by Junping Du.
Repository: hadoop Updated Branches: refs/heads/trunk 832b3cbde -> c4084d9bc HADOOP-10729. Add tests for PB RPC in case version mismatch of client and server. Contributed by Junping Du. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/c4084d9b Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/c4084d9b Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/c4084d9b Branch: refs/heads/trunk Commit: c4084d9bc3b5c20405d9da6623b330d5720b64a1 Parents: 832b3cb Author: Haohui Mai Authored: Wed Dec 9 05:41:44 2015 +0800 Committer: Haohui Mai Committed: Wed Dec 9 05:41:44 2015 +0800 -- hadoop-common-project/hadoop-common/CHANGES.txt | 3 + .../ipc/TestProtoBufRPCCompatibility.java | 178 +++ .../hadoop-common/src/test/proto/test.proto | 8 + .../src/test/proto/test_rpc_service.proto | 15 ++ 4 files changed, 204 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/c4084d9b/hadoop-common-project/hadoop-common/CHANGES.txt -- diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index e7da77b..4cd295e 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -1497,6 +1497,9 @@ Release 2.8.0 - UNRELEASED HADOOP-12609. Fix intermittent failure of TestDecayRpcScheduler. (Masatake Iwasaki via Arpit Agarwal) +HADOOP-10729. Add tests for PB RPC in case version mismatch of client and +server. (Junping Du via wheat9) + Release 2.7.3 - UNRELEASED INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/hadoop/blob/c4084d9b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestProtoBufRPCCompatibility.java -- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestProtoBufRPCCompatibility.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestProtoBufRPCCompatibility.java new file mode 100644 index 000..76a93cf --- /dev/null +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestProtoBufRPCCompatibility.java @@ -0,0 +1,178 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.ipc; + +import static org.junit.Assert.fail; + +import java.io.IOException; +import java.net.InetSocketAddress; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.CommonConfigurationKeys; + +import org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.OptRequestProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.OptResponseProto; + +import org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.OldProtobufRpcProto; +import org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.NewProtobufRpcProto; +import org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.NewerProtobufRpcProto; +import org.apache.hadoop.net.NetUtils; +import org.junit.Assert; +import org.junit.Test; + +import com.google.protobuf.BlockingService; +import com.google.protobuf.RpcController; +import com.google.protobuf.ServiceException; + +public class TestProtoBufRPCCompatibility { + + private static final String ADDRESS = "0.0.0.0"; + public final static int PORT = 0; + private static InetSocketAddress addr; + private static RPC.Server server; + private static Configuration conf; + + @ProtocolInfo(protocolName = "testProto", protocolVersion = 1) + public interface OldRpcService extends + OldProtobufRpcProto.BlockingInterface { + } + + @ProtocolInfo(protocolName = "testProto", protocolVersion = 2) + public interface NewRpcService extends
hadoop git commit: HADOOP-10729. Add tests for PB RPC in case version mismatch of client and server. Contributed by Junping Du.
Repository: hadoop Updated Branches: refs/heads/branch-2 bfe479680 -> 417fbf2dc HADOOP-10729. Add tests for PB RPC in case version mismatch of client and server. Contributed by Junping Du. Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/417fbf2d Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/417fbf2d Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/417fbf2d Branch: refs/heads/branch-2 Commit: 417fbf2dca8a65fb3ff5f5032f982b6509f31db9 Parents: bfe4796 Author: Haohui Mai Authored: Wed Dec 9 05:41:44 2015 +0800 Committer: Haohui Mai Committed: Wed Dec 9 05:42:24 2015 +0800 -- hadoop-common-project/hadoop-common/CHANGES.txt | 3 + .../ipc/TestProtoBufRPCCompatibility.java | 178 +++ .../hadoop-common/src/test/proto/test.proto | 8 + .../src/test/proto/test_rpc_service.proto | 15 ++ 4 files changed, 204 insertions(+) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/417fbf2d/hadoop-common-project/hadoop-common/CHANGES.txt -- diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 1f769db..1b23b4e 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -878,6 +878,9 @@ Release 2.8.0 - UNRELEASED HADOOP-12609. Fix intermittent failure of TestDecayRpcScheduler. (Masatake Iwasaki via Arpit Agarwal) +HADOOP-10729. Add tests for PB RPC in case version mismatch of client and +server. (Junping Du via wheat9) + Release 2.7.3 - UNRELEASED INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/hadoop/blob/417fbf2d/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestProtoBufRPCCompatibility.java -- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestProtoBufRPCCompatibility.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestProtoBufRPCCompatibility.java new file mode 100644 index 000..76a93cf --- /dev/null +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestProtoBufRPCCompatibility.java @@ -0,0 +1,178 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.ipc; + +import static org.junit.Assert.fail; + +import java.io.IOException; +import java.net.InetSocketAddress; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.CommonConfigurationKeys; + +import org.apache.hadoop.ipc.protobuf.TestProtos.EchoRequestProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.EchoResponseProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.EmptyRequestProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.EmptyResponseProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.OptRequestProto; +import org.apache.hadoop.ipc.protobuf.TestProtos.OptResponseProto; + +import org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.OldProtobufRpcProto; +import org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.NewProtobufRpcProto; +import org.apache.hadoop.ipc.protobuf.TestRpcServiceProtos.NewerProtobufRpcProto; +import org.apache.hadoop.net.NetUtils; +import org.junit.Assert; +import org.junit.Test; + +import com.google.protobuf.BlockingService; +import com.google.protobuf.RpcController; +import com.google.protobuf.ServiceException; + +public class TestProtoBufRPCCompatibility { + + private static final String ADDRESS = "0.0.0.0"; + public final static int PORT = 0; + private static InetSocketAddress addr; + private static RPC.Server server; + private static Configuration conf; + + @ProtocolInfo(protocolName = "testProto", protocolVersion = 1) + public interface OldRpcService extends + OldProtobufRpcProto.BlockingInterface { + } + + @ProtocolInfo(protocolName = "testProto", protocolVersion = 2) + public interface NewRpcService exte