From 22377ebae54ed9bd71861921ba5ba04aadd8397e Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Sat, 27 Oct 2012 18:44:15 +0000 Subject: [PATCH] HADOOP-8985. Add namespace declarations in .proto files for languages other than java. Thank you Binglin Chan. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1402845 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../hadoop-common/src/main/proto/HAServiceProtocol.proto | 1 + .../hadoop-common/src/main/proto/IpcConnectionContext.proto | 1 + .../hadoop-common/src/main/proto/ProtocolInfo.proto | 1 + .../hadoop-common/src/main/proto/RpcPayloadHeader.proto | 1 + .../hadoop-common/src/main/proto/ZKFCProtocol.proto | 1 + .../hadoop-common/src/main/proto/hadoop_rpc.proto | 1 + hadoop-common-project/hadoop-common/src/test/proto/test.proto | 1 + .../hadoop-common/src/test/proto/test_rpc_service.proto | 1 + 9 files changed, 11 insertions(+) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index a4e928eef38..1494e887e19 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -330,6 +330,9 @@ Release 2.0.3-alpha - Unreleased HADOOP-8925. Remove the packaging. (eli) + HADOOP-8985. Add namespace declarations in .proto files for languages + other than java. (Binglin Chan via suresh) + OPTIMIZATIONS HADOOP-8866. SampleQuantiles#query is O(N^2) instead of O(N). (Andrew Wang diff --git a/hadoop-common-project/hadoop-common/src/main/proto/HAServiceProtocol.proto b/hadoop-common-project/hadoop-common/src/main/proto/HAServiceProtocol.proto index 70ecac84571..94ad5f4a551 100644 --- a/hadoop-common-project/hadoop-common/src/main/proto/HAServiceProtocol.proto +++ b/hadoop-common-project/hadoop-common/src/main/proto/HAServiceProtocol.proto @@ -20,6 +20,7 @@ option java_package = "org.apache.hadoop.ha.proto"; option java_outer_classname = "HAServiceProtocolProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; +package hadoop.common; enum HAServiceStateProto { INITIALIZING = 0; diff --git a/hadoop-common-project/hadoop-common/src/main/proto/IpcConnectionContext.proto b/hadoop-common-project/hadoop-common/src/main/proto/IpcConnectionContext.proto index 16ba867ed57..1c660f77e9c 100644 --- a/hadoop-common-project/hadoop-common/src/main/proto/IpcConnectionContext.proto +++ b/hadoop-common-project/hadoop-common/src/main/proto/IpcConnectionContext.proto @@ -18,6 +18,7 @@ option java_package = "org.apache.hadoop.ipc.protobuf"; option java_outer_classname = "IpcConnectionContextProtos"; option java_generate_equals_and_hash = true; +package hadoop.common; /** * Spec for UserInformationProto is specified in ProtoUtil#makeIpcConnectionContext diff --git a/hadoop-common-project/hadoop-common/src/main/proto/ProtocolInfo.proto b/hadoop-common-project/hadoop-common/src/main/proto/ProtocolInfo.proto index 53046aaffda..7f771453d28 100644 --- a/hadoop-common-project/hadoop-common/src/main/proto/ProtocolInfo.proto +++ b/hadoop-common-project/hadoop-common/src/main/proto/ProtocolInfo.proto @@ -20,6 +20,7 @@ option java_package = "org.apache.hadoop.ipc.protobuf"; option java_outer_classname = "ProtocolInfoProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; +package hadoop.common; /** * Request to get protocol versions for all supported rpc kinds. diff --git a/hadoop-common-project/hadoop-common/src/main/proto/RpcPayloadHeader.proto b/hadoop-common-project/hadoop-common/src/main/proto/RpcPayloadHeader.proto index 50657413012..feb90124412 100644 --- a/hadoop-common-project/hadoop-common/src/main/proto/RpcPayloadHeader.proto +++ b/hadoop-common-project/hadoop-common/src/main/proto/RpcPayloadHeader.proto @@ -18,6 +18,7 @@ option java_package = "org.apache.hadoop.ipc.protobuf"; option java_outer_classname = "RpcPayloadHeaderProtos"; option java_generate_equals_and_hash = true; +package hadoop.common; /** * This is the rpc payload header. It is sent with every rpc call. diff --git a/hadoop-common-project/hadoop-common/src/main/proto/ZKFCProtocol.proto b/hadoop-common-project/hadoop-common/src/main/proto/ZKFCProtocol.proto index 1037b028ce6..795f64fc24f 100644 --- a/hadoop-common-project/hadoop-common/src/main/proto/ZKFCProtocol.proto +++ b/hadoop-common-project/hadoop-common/src/main/proto/ZKFCProtocol.proto @@ -20,6 +20,7 @@ option java_package = "org.apache.hadoop.ha.proto"; option java_outer_classname = "ZKFCProtocolProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; +package hadoop.common; message CedeActiveRequestProto { required uint32 millisToCede = 1; diff --git a/hadoop-common-project/hadoop-common/src/main/proto/hadoop_rpc.proto b/hadoop-common-project/hadoop-common/src/main/proto/hadoop_rpc.proto index d694e228c07..cea0eaa432f 100644 --- a/hadoop-common-project/hadoop-common/src/main/proto/hadoop_rpc.proto +++ b/hadoop-common-project/hadoop-common/src/main/proto/hadoop_rpc.proto @@ -23,6 +23,7 @@ option java_package = "org.apache.hadoop.ipc.protobuf"; option java_outer_classname = "HadoopRpcProtos"; option java_generate_equals_and_hash = true; +package hadoop.common; /** * This message is used for Protobuf Rpc Engine. diff --git a/hadoop-common-project/hadoop-common/src/test/proto/test.proto b/hadoop-common-project/hadoop-common/src/test/proto/test.proto index 71f4427052c..91a2f5e4594 100644 --- a/hadoop-common-project/hadoop-common/src/test/proto/test.proto +++ b/hadoop-common-project/hadoop-common/src/test/proto/test.proto @@ -19,6 +19,7 @@ option java_package = "org.apache.hadoop.ipc.protobuf"; option java_outer_classname = "TestProtos"; option java_generate_equals_and_hash = true; +package hadoop.common; message EmptyRequestProto { } diff --git a/hadoop-common-project/hadoop-common/src/test/proto/test_rpc_service.proto b/hadoop-common-project/hadoop-common/src/test/proto/test_rpc_service.proto index 3dcffe9d090..7f70c3a99de 100644 --- a/hadoop-common-project/hadoop-common/src/test/proto/test_rpc_service.proto +++ b/hadoop-common-project/hadoop-common/src/test/proto/test_rpc_service.proto @@ -19,6 +19,7 @@ option java_package = "org.apache.hadoop.ipc.protobuf"; option java_outer_classname = "TestRpcServiceProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; +package hadoop.common; import "test.proto";