From 9a0dec60fff02393d2b6e8edc367a3bff8ce1d3e Mon Sep 17 00:00:00 2001 From: Colin McCabe Date: Wed, 16 Apr 2014 22:58:40 +0000 Subject: [PATCH] HDFS-4909. Avoid protocol buffer RPC namespace clashes (cmccabe) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1588091 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 + hadoop-hdfs-project/hadoop-hdfs/pom.xml | 77 ++----------------- .../src/main/proto/DatanodeProtocol.proto | 2 +- .../src/main/proto/NamenodeProtocol.proto | 2 +- .../src/main/proto/QJournalProtocol.proto | 2 +- 5 files changed, 12 insertions(+), 73 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index e261fa033d..69019ef1ea 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -357,6 +357,8 @@ Release 2.5.0 - UNRELEASED HDFS-5409. TestOfflineEditsViewer#testStored fails on Windows due to CRLF line endings in editsStored.xml from git checkout. (cnauroth) + HDFS-4909. Avoid protocol buffer RPC namespace clashes. (cmccabe) + Release 2.4.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/pom.xml b/hadoop-hdfs-project/hadoop-hdfs/pom.xml index 442cf58284..9218c4a73b 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/pom.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/pom.xml @@ -430,81 +430,18 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> ${basedir}/src/main/proto + ClientDatanodeProtocol.proto + ClientNamenodeProtocol.proto + DatanodeProtocol.proto HAZKInfo.proto InterDatanodeProtocol.proto JournalProtocol.proto - datatransfer.proto - hdfs.proto - - - ${project.build.directory}/generated-sources/java - - - - compile-protoc-datanode - generate-sources - - protoc - - - ${protobuf.version} - ${protoc.path} - - ${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto - ${basedir}/src/main/proto - - - ${basedir}/src/main/proto - - ClientDatanodeProtocol.proto - DatanodeProtocol.proto - fsimage.proto - - - ${project.build.directory}/generated-sources/java - - - - compile-protoc-namenode - generate-sources - - protoc - - - ${protobuf.version} - ${protoc.path} - - ${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto - ${basedir}/src/main/proto - - - ${basedir}/src/main/proto - - ClientNamenodeProtocol.proto NamenodeProtocol.proto - acl.proto - - - ${project.build.directory}/generated-sources/java - - - - compile-protoc-qjournal - generate-sources - - protoc - - - ${protobuf.version} - ${protoc.path} - - ${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto - ${basedir}/src/main/proto - - - ${basedir}/src/main/proto - QJournalProtocol.proto + acl.proto + datatransfer.proto + fsimage.proto + hdfs.proto ${project.build.directory}/generated-sources/java diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/DatanodeProtocol.proto b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/DatanodeProtocol.proto index 17aedd87bd..d6cc3d3777 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/DatanodeProtocol.proto +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/DatanodeProtocol.proto @@ -29,7 +29,7 @@ option java_package = "org.apache.hadoop.hdfs.protocol.proto"; option java_outer_classname = "DatanodeProtocolProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; -package hadoop.hdfs; +package hadoop.hdfs.datanode; import "HAServiceProtocol.proto"; import "hdfs.proto"; diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/NamenodeProtocol.proto b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/NamenodeProtocol.proto index 7c6084d1e8..4bcbeed9b5 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/NamenodeProtocol.proto +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/NamenodeProtocol.proto @@ -29,7 +29,7 @@ option java_package = "org.apache.hadoop.hdfs.protocol.proto"; option java_outer_classname = "NamenodeProtocolProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; -package hadoop.hdfs; +package hadoop.hdfs.namenode; import "hdfs.proto"; diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/QJournalProtocol.proto b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/QJournalProtocol.proto index d3b67f2ab1..809ee3580e 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/QJournalProtocol.proto +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/QJournalProtocol.proto @@ -26,7 +26,7 @@ option java_package = "org.apache.hadoop.hdfs.qjournal.protocol"; option java_outer_classname = "QJournalProtocolProtos"; option java_generic_services = true; option java_generate_equals_and_hash = true; -package hadoop.hdfs; +package hadoop.hdfs.qjournal; import "hdfs.proto";