HADOOP-16561. [MAPREDUCE] use protobuf-maven-plugin to generate protobuf classes (#1500)

Signed-off-by: Vinayakumar B <vinayakumarb@apache.org>
This commit is contained in:
Duo Zhang 2019-09-24 08:52:12 +08:00 committed by GitHub
parent bfe1dac29d
commit e8e7d7b4cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 27 additions and 41 deletions

View File

@ -56,31 +56,21 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-maven-plugins</artifactId>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<executions>
<execution>
<id>compile-protoc</id>
<goals>
<goal>protoc</goal>
</goals>
<id>src-compile-protoc</id>
<configuration>
<protocVersion>${protobuf.version}</protocVersion>
<protocCommand>${protoc.path}</protocCommand>
<imports>
<param>${basedir}/../../../hadoop-common-project/hadoop-common/src/main/proto</param>
<param>${basedir}/../../../hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto</param>
<param>${basedir}/src/main/proto</param>
</imports>
<source>
<directory>${basedir}/src/main/proto</directory>
<includes>
<include>HSAdminRefreshProtocol.proto</include>
<include>mr_protos.proto</include>
<include>mr_service_protos.proto</include>
<include>MRClientProtocol.proto</include>
</includes>
</source>
<skip>false</skip>
<additionalProtoPathElements>
<additionalProtoPathElement>
${basedir}/../../../hadoop-common-project/hadoop-common/src/main/proto
</additionalProtoPathElement>
<additionalProtoPathElement>
${basedir}/../../../hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/proto
</additionalProtoPathElement>
</additionalProtoPathElements>
</configuration>
</execution>
</executions>

View File

@ -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);
}
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -60,27 +60,18 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-maven-plugins</artifactId>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<executions>
<execution>
<id>compile-protoc</id>
<goals>
<goal>protoc</goal>
</goals>
<id>src-compile-protoc</id>
<configuration>
<protocVersion>${protobuf.version}</protocVersion>
<protocCommand>${protoc.path}</protocCommand>
<imports>
<param>${basedir}/../../../hadoop-common-project/hadoop-common/src/main/proto</param>
<param>${basedir}/src/main/proto</param>
</imports>
<source>
<directory>${basedir}/src/main/proto</directory>
<includes>
<include>ShuffleHandlerRecovery.proto</include>
</includes>
</source>
<skip>false</skip>
<additionalProtoPathElements>
<additionalProtoPathElement>
${basedir}/../../../hadoop-common-project/hadoop-common/src/main/proto
</additionalProtoPathElement>
</additionalProtoPathElements>
</configuration>
</execution>
</executions>

View File

@ -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;