From d28e7119560c5da8d4a3d915cc02021811b01171 Mon Sep 17 00:00:00 2001 From: Colin McCabe Date: Wed, 16 Apr 2014 23:01:16 +0000 Subject: [PATCH] HDFS-4909. Avoid protocol buffer RPC namespace clashes (cmccabe) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1588093 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 dc64a2691e0..b7be5793940 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -107,6 +107,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 acb117da81e..362b39f44b2 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/pom.xml +++ b/hadoop-hdfs-project/hadoop-hdfs/pom.xml @@ -425,81 +425,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 9bb2c94cf3e..03a73d79fb0 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 "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 7c6084d1e8a..4bcbeed9b56 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 e4903ba4955..aaea12e03ac 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";