From 57fd58bc3c48b40f6e86e6c66af052ba00b18b75 Mon Sep 17 00:00:00 2001 From: Duo Zhang Date: Tue, 24 Sep 2019 08:52:12 +0800 Subject: [PATCH] HADOOP-16664 Backport "HADOOP-16561 [MAPREDUCE] use protobuf-maven-plugin to generate protobuf classes" to all active branches --- .../hadoop-mapreduce-client-common/pom.xml | 34 +++++++------------ .../main/proto/HSAdminRefreshProtocol.proto | 3 +- .../src/main/proto/MRClientProtocol.proto | 1 + .../src/main/proto/mr_protos.proto | 1 + .../src/main/proto/mr_service_protos.proto | 1 + .../hadoop-mapreduce-client-shuffle/pom.xml | 27 +++++---------- .../main/proto/ShuffleHandlerRecovery.proto | 1 + 7 files changed, 27 insertions(+), 41 deletions(-) diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/pom.xml b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/pom.xml index a1148640fb1..b6cce51efde 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/pom.xml +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/pom.xml @@ -51,31 +51,21 @@ - org.apache.hadoop - hadoop-maven-plugins + org.xolstice.maven.plugins + protobuf-maven-plugin - compile-protoc - - protoc - + src-compile-protoc - ${protobuf.version} - ${protoc.path} - - ${basedir}/../../../hadoop-common-project/hadoop-common/src/main/proto - ${basedir}/../../../hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto - ${basedir}/src/main/proto - - - ${basedir}/src/main/proto - - HSAdminRefreshProtocol.proto - mr_protos.proto - mr_service_protos.proto - MRClientProtocol.proto - - + false + + + ${basedir}/../../../hadoop-common-project/hadoop-common/src/main/proto + + + ${basedir}/../../../hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto + + diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/HSAdminRefreshProtocol.proto b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/HSAdminRefreshProtocol.proto index 1f95ee1c633..8e077adec4f 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/HSAdminRefreshProtocol.proto +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/HSAdminRefreshProtocol.proto @@ -16,6 +16,7 @@ * limitations under the License. */ +syntax = "proto2"; option java_package = "org.apache.hadoop.mapreduce.v2.hs.proto"; option java_outer_classname = "HSAdminRefreshProtocolProtos"; option java_generic_services = true; @@ -97,4 +98,4 @@ service HSAdminRefreshProtocolService { */ rpc refreshLogRetentionSettings(RefreshLogRetentionSettingsRequestProto) returns(RefreshLogRetentionSettingsResponseProto); -} \ No newline at end of file +} diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/MRClientProtocol.proto b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/MRClientProtocol.proto index 3f09719ba9b..1fb3004b545 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/MRClientProtocol.proto +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/MRClientProtocol.proto @@ -16,6 +16,7 @@ * limitations under the License. */ +syntax = "proto2"; option java_package = "org.apache.hadoop.yarn.proto"; option java_outer_classname = "MRClientProtocol"; option java_generic_services = true; diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/mr_protos.proto b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/mr_protos.proto index cf099002f1b..9a1f2456845 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/mr_protos.proto +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/mr_protos.proto @@ -16,6 +16,7 @@ * limitations under the License. */ +syntax = "proto2"; option java_package = "org.apache.hadoop.mapreduce.v2.proto"; option java_outer_classname = "MRProtos"; option java_generic_services = true; diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/mr_service_protos.proto b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/mr_service_protos.proto index cb3c30c27a7..86bb8ca6bab 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/mr_service_protos.proto +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/proto/mr_service_protos.proto @@ -16,6 +16,7 @@ * limitations under the License. */ +syntax = "proto2"; option java_package = "org.apache.hadoop.mapreduce.v2.proto"; option java_outer_classname = "MRServiceProtos"; option java_generic_services = true; diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/pom.xml b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/pom.xml index 92c2105ee34..75075127424 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/pom.xml +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/pom.xml @@ -60,27 +60,18 @@ - org.apache.hadoop - hadoop-maven-plugins + org.xolstice.maven.plugins + protobuf-maven-plugin - compile-protoc - - protoc - + src-compile-protoc - ${protobuf.version} - ${protoc.path} - - ${basedir}/../../../hadoop-common-project/hadoop-common/src/main/proto - ${basedir}/src/main/proto - - - ${basedir}/src/main/proto - - ShuffleHandlerRecovery.proto - - + false + + + ${basedir}/../../../hadoop-common-project/hadoop-common/src/main/proto + + diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/proto/ShuffleHandlerRecovery.proto b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/proto/ShuffleHandlerRecovery.proto index 7a81ffbbe1e..a3129f3e3b7 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/proto/ShuffleHandlerRecovery.proto +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/proto/ShuffleHandlerRecovery.proto @@ -16,6 +16,7 @@ * limitations under the License. */ +syntax = "proto2"; option java_package = "org.apache.hadoop.mapred.proto"; option java_outer_classname = "ShuffleHandlerRecoveryProtos"; option java_generic_services = true;