| commit 0296d8d024a2ade8d0dfc2c38e82f70052269339 |
| Author: Masatake Iwasaki <iwasakims@apache.org> |
| Date: Mon Jan 18 04:27:18 2021 +0000 |
| |
| Revert "HADOOP-16598. Backport "HADOOP-16558 [COMMON+HDFS] use protobuf-maven-plugin to generate protobuf classes" to all active branches" |
| |
| This reverts commit a37a4bc62ff64f965693b328974e9556c2044892. |
| |
| diff --git a/hadoop-common-project/hadoop-common/pom.xml b/hadoop-common-project/hadoop-common/pom.xml |
| index fa4a838babb..0542ae83d77 100644 |
| --- a/hadoop-common-project/hadoop-common/pom.xml |
| +++ b/hadoop-common-project/hadoop-common/pom.xml |
| @@ -360,20 +360,6 @@ |
| </resource> |
| </resources> |
| <plugins> |
| - <plugin> |
| - <groupId>org.xolstice.maven.plugins</groupId> |
| - <artifactId>protobuf-maven-plugin</artifactId> |
| - <executions> |
| - <execution> |
| - <id>src-compile-protoc</id> |
| - <configuration><skip>false</skip></configuration> |
| - </execution> |
| - <execution> |
| - <id>src-test-compile-protoc</id> |
| - <configuration><skip>false</skip></configuration> |
| - </execution> |
| - </executions> |
| - </plugin> |
| <plugin> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-maven-plugins</artifactId> |
| @@ -394,6 +380,58 @@ |
| </source> |
| </configuration> |
| </execution> |
| + <execution> |
| + <id>compile-protoc</id> |
| + <goals> |
| + <goal>protoc</goal> |
| + </goals> |
| + <configuration> |
| + <protocVersion>${protobuf.version}</protocVersion> |
| + <protocCommand>${protoc.path}</protocCommand> |
| + <imports> |
| + <param>${basedir}/src/main/proto</param> |
| + </imports> |
| + <source> |
| + <directory>${basedir}/src/main/proto</directory> |
| + <includes> |
| + <include>HAServiceProtocol.proto</include> |
| + <include>IpcConnectionContext.proto</include> |
| + <include>ProtocolInfo.proto</include> |
| + <include>RpcHeader.proto</include> |
| + <include>ZKFCProtocol.proto</include> |
| + <include>ProtobufRpcEngine.proto</include> |
| + <include>Security.proto</include> |
| + <include>GetUserMappingsProtocol.proto</include> |
| + <include>TraceAdmin.proto</include> |
| + <include>RefreshAuthorizationPolicyProtocol.proto</include> |
| + <include>RefreshUserMappingsProtocol.proto</include> |
| + <include>RefreshCallQueueProtocol.proto</include> |
| + <include>GenericRefreshProtocol.proto</include> |
| + <include>FSProtos.proto</include> |
| + </includes> |
| + </source> |
| + </configuration> |
| + </execution> |
| + <execution> |
| + <id>compile-test-protoc</id> |
| + <goals> |
| + <goal>test-protoc</goal> |
| + </goals> |
| + <configuration> |
| + <protocVersion>${protobuf.version}</protocVersion> |
| + <protocCommand>${protoc.path}</protocCommand> |
| + <imports> |
| + <param>${basedir}/src/test/proto</param> |
| + </imports> |
| + <source> |
| + <directory>${basedir}/src/test/proto</directory> |
| + <includes> |
| + <include>test.proto</include> |
| + <include>test_rpc_service.proto</include> |
| + </includes> |
| + </source> |
| + </configuration> |
| + </execution> |
| <execution> |
| <id>resource-gz</id> |
| <phase>generate-resources</phase> |
| diff --git a/hadoop-common-project/hadoop-common/src/main/proto/FSProtos.proto b/hadoop-common-project/hadoop-common/src/main/proto/FSProtos.proto |
| index c895bce757b..c3b768ab67e 100644 |
| --- a/hadoop-common-project/hadoop-common/src/main/proto/FSProtos.proto |
| +++ b/hadoop-common-project/hadoop-common/src/main/proto/FSProtos.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.fs"; |
| option java_outer_classname = "FSProtos"; |
| option java_generic_services = true; |
| diff --git a/hadoop-common-project/hadoop-common/src/main/proto/GenericRefreshProtocol.proto b/hadoop-common-project/hadoop-common/src/main/proto/GenericRefreshProtocol.proto |
| index 6296f88da69..fe465490b19 100644 |
| --- a/hadoop-common-project/hadoop-common/src/main/proto/GenericRefreshProtocol.proto |
| +++ b/hadoop-common-project/hadoop-common/src/main/proto/GenericRefreshProtocol.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.ipc.proto"; |
| option java_outer_classname = "GenericRefreshProtocolProtos"; |
| option java_generic_services = true; |
| diff --git a/hadoop-common-project/hadoop-common/src/main/proto/GetUserMappingsProtocol.proto b/hadoop-common-project/hadoop-common/src/main/proto/GetUserMappingsProtocol.proto |
| index cb91a13b048..51552b879f3 100644 |
| --- a/hadoop-common-project/hadoop-common/src/main/proto/GetUserMappingsProtocol.proto |
| +++ b/hadoop-common-project/hadoop-common/src/main/proto/GetUserMappingsProtocol.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.tools.proto"; |
| option java_outer_classname = "GetUserMappingsProtocolProtos"; |
| option java_generic_services = true; |
| 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 5a88a7ff03f..16ee9a2e0a5 100644 |
| --- a/hadoop-common-project/hadoop-common/src/main/proto/HAServiceProtocol.proto |
| +++ b/hadoop-common-project/hadoop-common/src/main/proto/HAServiceProtocol.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.ha.proto"; |
| option java_outer_classname = "HAServiceProtocolProtos"; |
| option java_generic_services = true; |
| 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 16e2fb7c4db..4557e893cff 100644 |
| --- a/hadoop-common-project/hadoop-common/src/main/proto/IpcConnectionContext.proto |
| +++ b/hadoop-common-project/hadoop-common/src/main/proto/IpcConnectionContext.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.ipc.protobuf"; |
| option java_outer_classname = "IpcConnectionContextProtos"; |
| option java_generate_equals_and_hash = true; |
| diff --git a/hadoop-common-project/hadoop-common/src/main/proto/ProtobufRpcEngine.proto b/hadoop-common-project/hadoop-common/src/main/proto/ProtobufRpcEngine.proto |
| index fa113134027..a17e2078e94 100644 |
| --- a/hadoop-common-project/hadoop-common/src/main/proto/ProtobufRpcEngine.proto |
| +++ b/hadoop-common-project/hadoop-common/src/main/proto/ProtobufRpcEngine.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax = "proto2"; |
| + |
| /** |
| * These are the messages used by Hadoop RPC for the Rpc Engine Protocol Buffer |
| * to marshal the request and response in the RPC layer. |
| 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 0e9d0d4baa4..fdbc440d91c 100644 |
| --- a/hadoop-common-project/hadoop-common/src/main/proto/ProtocolInfo.proto |
| +++ b/hadoop-common-project/hadoop-common/src/main/proto/ProtocolInfo.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.ipc.protobuf"; |
| option java_outer_classname = "ProtocolInfoProtos"; |
| option java_generic_services = true; |
| diff --git a/hadoop-common-project/hadoop-common/src/main/proto/RefreshAuthorizationPolicyProtocol.proto b/hadoop-common-project/hadoop-common/src/main/proto/RefreshAuthorizationPolicyProtocol.proto |
| index f57c6d63039..5ef1c2d0a8c 100644 |
| --- a/hadoop-common-project/hadoop-common/src/main/proto/RefreshAuthorizationPolicyProtocol.proto |
| +++ b/hadoop-common-project/hadoop-common/src/main/proto/RefreshAuthorizationPolicyProtocol.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.security.proto"; |
| option java_outer_classname = "RefreshAuthorizationPolicyProtocolProtos"; |
| option java_generic_services = true; |
| diff --git a/hadoop-common-project/hadoop-common/src/main/proto/RefreshCallQueueProtocol.proto b/hadoop-common-project/hadoop-common/src/main/proto/RefreshCallQueueProtocol.proto |
| index 463b7c548fe..67ed1332510 100644 |
| --- a/hadoop-common-project/hadoop-common/src/main/proto/RefreshCallQueueProtocol.proto |
| +++ b/hadoop-common-project/hadoop-common/src/main/proto/RefreshCallQueueProtocol.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.ipc.proto"; |
| option java_outer_classname = "RefreshCallQueueProtocolProtos"; |
| option java_generic_services = true; |
| diff --git a/hadoop-common-project/hadoop-common/src/main/proto/RefreshUserMappingsProtocol.proto b/hadoop-common-project/hadoop-common/src/main/proto/RefreshUserMappingsProtocol.proto |
| index a1130f5c2d9..41031ed9ea0 100644 |
| --- a/hadoop-common-project/hadoop-common/src/main/proto/RefreshUserMappingsProtocol.proto |
| +++ b/hadoop-common-project/hadoop-common/src/main/proto/RefreshUserMappingsProtocol.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.security.proto"; |
| option java_outer_classname = "RefreshUserMappingsProtocolProtos"; |
| option java_generic_services = true; |
| diff --git a/hadoop-common-project/hadoop-common/src/main/proto/RpcHeader.proto b/hadoop-common-project/hadoop-common/src/main/proto/RpcHeader.proto |
| index 4705b4276b8..e8d8cbbfe70 100644 |
| --- a/hadoop-common-project/hadoop-common/src/main/proto/RpcHeader.proto |
| +++ b/hadoop-common-project/hadoop-common/src/main/proto/RpcHeader.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.ipc.protobuf"; |
| option java_outer_classname = "RpcHeaderProtos"; |
| option java_generate_equals_and_hash = true; |
| diff --git a/hadoop-common-project/hadoop-common/src/main/proto/Security.proto b/hadoop-common-project/hadoop-common/src/main/proto/Security.proto |
| index 5177a86ef11..037a8781a9a 100644 |
| --- a/hadoop-common-project/hadoop-common/src/main/proto/Security.proto |
| +++ b/hadoop-common-project/hadoop-common/src/main/proto/Security.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.security.proto"; |
| option java_outer_classname = "SecurityProtos"; |
| option java_generic_services = true; |
| diff --git a/hadoop-common-project/hadoop-common/src/main/proto/TraceAdmin.proto b/hadoop-common-project/hadoop-common/src/main/proto/TraceAdmin.proto |
| index 8cf131bfb46..52d2a90abf4 100644 |
| --- a/hadoop-common-project/hadoop-common/src/main/proto/TraceAdmin.proto |
| +++ b/hadoop-common-project/hadoop-common/src/main/proto/TraceAdmin.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.tracing"; |
| option java_outer_classname = "TraceAdminPB"; |
| option java_generic_services = true; |
| 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 98bc05f4a36..a2b8dd10b30 100644 |
| --- a/hadoop-common-project/hadoop-common/src/main/proto/ZKFCProtocol.proto |
| +++ b/hadoop-common-project/hadoop-common/src/main/proto/ZKFCProtocol.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.ha.proto"; |
| option java_outer_classname = "ZKFCProtocolProtos"; |
| option java_generic_services = true; |
| 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 2c41aa2bc7c..37e9a0bf7aa 100644 |
| --- a/hadoop-common-project/hadoop-common/src/test/proto/test.proto |
| +++ b/hadoop-common-project/hadoop-common/src/test/proto/test.proto |
| @@ -15,7 +15,7 @@ |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.ipc.protobuf"; |
| option java_outer_classname = "TestProtos"; |
| option java_generate_equals_and_hash = true; |
| 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 f6990279140..0df67a0ea3e 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 |
| @@ -15,7 +15,6 @@ |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| -syntax = "proto2"; |
| option java_package = "org.apache.hadoop.ipc.protobuf"; |
| option java_outer_classname = "TestRpcServiceProtos"; |
| option java_generic_services = true; |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/pom.xml b/hadoop-hdfs-project/hadoop-hdfs-client/pom.xml |
| index ffcf3624db0..bf915ba75fa 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs-client/pom.xml |
| +++ b/hadoop-hdfs-project/hadoop-hdfs-client/pom.xml |
| @@ -136,18 +136,36 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| </configuration> |
| </plugin> |
| <plugin> |
| - <groupId>org.xolstice.maven.plugins</groupId> |
| - <artifactId>protobuf-maven-plugin</artifactId> |
| + <groupId>org.apache.hadoop</groupId> |
| + <artifactId>hadoop-maven-plugins</artifactId> |
| <executions> |
| <execution> |
| - <id>src-compile-protoc</id> |
| + <id>compile-protoc</id> |
| + <goals> |
| + <goal>protoc</goal> |
| + </goals> |
| <configuration> |
| - <skip>false</skip> |
| - <additionalProtoPathElements> |
| - <additionalProtoPathElement> |
| - ${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto |
| - </additionalProtoPathElement> |
| - </additionalProtoPathElements> |
| + <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>ClientDatanodeProtocol.proto</include> |
| + <include>ClientNamenodeProtocol.proto</include> |
| + <include>acl.proto</include> |
| + <include>xattr.proto</include> |
| + <include>datatransfer.proto</include> |
| + <include>hdfs.proto</include> |
| + <include>encryption.proto</include> |
| + <include>inotify.proto</include> |
| + <include>erasurecoding.proto</include> |
| + <include>ReconfigurationProtocol.proto</include> |
| + </includes> |
| + </source> |
| </configuration> |
| </execution> |
| </executions> |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/ClientDatanodeProtocol.proto b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/ClientDatanodeProtocol.proto |
| index 84cd771da49..52f6330e0bd 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/ClientDatanodeProtocol.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/ClientDatanodeProtocol.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax="proto2"; |
| + |
| // This file contains protocol buffers that are used throughout HDFS -- i.e. |
| // by the client, server, and data transfer protocols. |
| |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/ClientNamenodeProtocol.proto b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/ClientNamenodeProtocol.proto |
| index f353c033a50..8cf07a86cb9 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/ClientNamenodeProtocol.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/ClientNamenodeProtocol.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax="proto2"; |
| + |
| option java_package = "org.apache.hadoop.hdfs.protocol.proto"; |
| option java_outer_classname = "ClientNamenodeProtocolProtos"; |
| option java_generic_services = true; |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/ReconfigurationProtocol.proto b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/ReconfigurationProtocol.proto |
| index bad9f45cf62..12a38b110fe 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/ReconfigurationProtocol.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/ReconfigurationProtocol.proto |
| @@ -15,7 +15,7 @@ |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| -syntax="proto2"; |
| + |
| // This file contains protocol buffers that are used to reconfigure NameNode |
| // and DataNode by HDFS admin. |
| |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/acl.proto b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/acl.proto |
| index e9a8ccb7569..c2529c90c32 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/acl.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/acl.proto |
| @@ -15,7 +15,7 @@ |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| -syntax="proto2"; |
| + |
| option java_package = "org.apache.hadoop.hdfs.protocol.proto"; |
| option java_outer_classname = "AclProtos"; |
| option java_generate_equals_and_hash = true; |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/datatransfer.proto b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/datatransfer.proto |
| index 66a69a9fcde..43a03e96e08 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/datatransfer.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/datatransfer.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax="proto2"; |
| + |
| // This file contains protocol buffers that are used to transfer data |
| // to and from the datanode, as well as between datanodes. |
| |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/encryption.proto b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/encryption.proto |
| index bcd82d63e05..75d3a0e2e44 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/encryption.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/encryption.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax="proto2"; |
| + |
| // This file contains protocol buffers that are used throughout HDFS -- i.e. |
| // by the client, server, and data transfer protocols. |
| |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/erasurecoding.proto b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/erasurecoding.proto |
| index d92dd4cb84c..9f576237ef5 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/erasurecoding.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/erasurecoding.proto |
| @@ -15,7 +15,7 @@ |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| -syntax="proto2"; |
| + |
| option java_package = "org.apache.hadoop.hdfs.protocol.proto"; |
| option java_outer_classname = "ErasureCodingProtos"; |
| option java_generate_equals_and_hash = true; |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/hdfs.proto b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/hdfs.proto |
| index 38459349ad4..8600a6fdc4b 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/hdfs.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/hdfs.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax="proto2"; |
| + |
| // This file contains protocol buffers that are used throughout HDFS -- i.e. |
| // by the client, server, and data transfer protocols. |
| |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/inotify.proto b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/inotify.proto |
| index afcccaa13bd..f1934082589 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/inotify.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/inotify.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax="proto2"; |
| + |
| // This file contains protocol buffers used to communicate edits to clients |
| // as part of the inotify system. |
| |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/xattr.proto b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/xattr.proto |
| index a53aa86c16d..6c8b5eb5943 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/xattr.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/proto/xattr.proto |
| @@ -15,7 +15,7 @@ |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| -syntax="proto2"; |
| + |
| option java_package = "org.apache.hadoop.hdfs.protocol.proto"; |
| option java_outer_classname = "XAttrProtos"; |
| option java_generate_equals_and_hash = true; |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/pom.xml b/hadoop-hdfs-project/hadoop-hdfs-rbf/pom.xml |
| index cc0dbf01e03..67c6831e2ad 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/pom.xml |
| +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/pom.xml |
| @@ -174,21 +174,29 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| </executions> |
| </plugin> |
| <plugin> |
| - <groupId>org.xolstice.maven.plugins</groupId> |
| - <artifactId>protobuf-maven-plugin</artifactId> |
| + <groupId>org.apache.hadoop</groupId> |
| + <artifactId>hadoop-maven-plugins</artifactId> |
| <executions> |
| <execution> |
| - <id>src-compile-protoc</id> |
| + <id>compile-protoc</id> |
| + <goals> |
| + <goal>protoc</goal> |
| + </goals> |
| <configuration> |
| - <skip>false</skip> |
| - <additionalProtoPathElements> |
| - <additionalProtoPathElement> |
| - ${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto |
| - </additionalProtoPathElement> |
| - <additionalProtoPathElement> |
| - ${basedir}/../hadoop-hdfs-client/src/main/proto |
| - </additionalProtoPathElement> |
| - </additionalProtoPathElements> |
| + <protocVersion>${protobuf.version}</protocVersion> |
| + <protocCommand>${protoc.path}</protocCommand> |
| + <imports> |
| + <param>${basedir}/../hadoop-hdfs-client/src/main/proto</param> |
| + <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>FederationProtocol.proto</include> |
| + <include>RouterProtocol.proto</include> |
| + </includes> |
| + </source> |
| </configuration> |
| </execution> |
| </executions> |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/proto/FederationProtocol.proto b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/proto/FederationProtocol.proto |
| index 1263630a223..b1a62b1c345 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/proto/FederationProtocol.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/proto/FederationProtocol.proto |
| @@ -15,7 +15,7 @@ |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.hdfs.federation.protocol.proto"; |
| option java_outer_classname = "HdfsServerFederationProtos"; |
| option java_generic_services = true; |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/proto/RouterProtocol.proto b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/proto/RouterProtocol.proto |
| index 3eff0929775..f3a2b6e8abc 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/proto/RouterProtocol.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/proto/RouterProtocol.proto |
| @@ -15,7 +15,7 @@ |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.hdfs.protocol.proto"; |
| option java_outer_classname = "RouterProtocolProtos"; |
| option java_generic_services = true; |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs/pom.xml b/hadoop-hdfs-project/hadoop-hdfs/pom.xml |
| index bc6dabc5294..fea414c8b53 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs/pom.xml |
| +++ b/hadoop-hdfs-project/hadoop-hdfs/pom.xml |
| @@ -306,29 +306,41 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| </executions> |
| </plugin> |
| <plugin> |
| - <groupId>org.xolstice.maven.plugins</groupId> |
| - <artifactId>protobuf-maven-plugin</artifactId> |
| + <groupId>org.apache.hadoop</groupId> |
| + <artifactId>hadoop-maven-plugins</artifactId> |
| <executions> |
| <execution> |
| - <id>src-compile-protoc</id> |
| + <id>compile-protoc</id> |
| + <goals> |
| + <goal>protoc</goal> |
| + </goals> |
| <configuration> |
| - <skip>false</skip> |
| - <additionalProtoPathElements> |
| - <additionalProtoPathElement> |
| - ${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto |
| - </additionalProtoPathElement> |
| - <additionalProtoPathElement> |
| - ${basedir}/../hadoop-hdfs-client/src/main/proto |
| - </additionalProtoPathElement> |
| - </additionalProtoPathElements> |
| + <protocVersion>${protobuf.version}</protocVersion> |
| + <protocCommand>${protoc.path}</protocCommand> |
| + <imports> |
| + <param>${basedir}/../../hadoop-common-project/hadoop-common/src/main/proto</param> |
| + <param>${basedir}/../hadoop-hdfs-client/src/main/proto</param> |
| + <param>${basedir}/src/main/proto</param> |
| + </imports> |
| + <source> |
| + <directory>${basedir}/src/main/proto</directory> |
| + <includes> |
| + <include>HdfsServer.proto</include> |
| + <include>DatanodeProtocol.proto</include> |
| + <include>DatanodeLifelineProtocol.proto</include> |
| + <include>HAZKInfo.proto</include> |
| + <include>InterDatanodeProtocol.proto</include> |
| + <include>JournalProtocol.proto</include> |
| + <include>NamenodeProtocol.proto</include> |
| + <include>QJournalProtocol.proto</include> |
| + <include>editlog.proto</include> |
| + <include>fsimage.proto</include> |
| + <include>AliasMapProtocol.proto</include> |
| + <include>InterQJournalProtocol.proto</include> |
| + </includes> |
| + </source> |
| </configuration> |
| </execution> |
| - </executions> |
| - </plugin> |
| - <plugin> |
| - <groupId>org.apache.hadoop</groupId> |
| - <artifactId>hadoop-maven-plugins</artifactId> |
| - <executions> |
| <execution> |
| <id>resource-gz</id> |
| <phase>generate-resources</phase> |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/AliasMapProtocol.proto b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/AliasMapProtocol.proto |
| index 8050f35454e..01dd9523bfb 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/AliasMapProtocol.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/AliasMapProtocol.proto |
| @@ -15,7 +15,7 @@ |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.hdfs.protocol.proto"; |
| option java_outer_classname = "AliasMapProtocolProtos"; |
| option java_generic_services = true; |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/DatanodeLifelineProtocol.proto b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/DatanodeLifelineProtocol.proto |
| index e10a8861e61..b6ab75653a1 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/DatanodeLifelineProtocol.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/DatanodeLifelineProtocol.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.hdfs.protocol.proto"; |
| option java_outer_classname = "DatanodeLifelineProtocolProtos"; |
| option java_generic_services = true; |
| 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 0e241301e08..4a8f9f00f22 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/DatanodeProtocol.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/DatanodeProtocol.proto |
| @@ -24,7 +24,7 @@ |
| |
| // This file contains protocol buffers that are used throughout HDFS -- i.e. |
| // by the client, server, and data transfer protocols. |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.hdfs.protocol.proto"; |
| option java_outer_classname = "DatanodeProtocolProtos"; |
| option java_generic_services = true; |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/HAZKInfo.proto b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/HAZKInfo.proto |
| index 6d45a935ee4..aa8b6be4532 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/HAZKInfo.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/HAZKInfo.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.hdfs.server.namenode.ha.proto"; |
| option java_outer_classname = "HAZKInfoProtos"; |
| package hadoop.hdfs; |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/HdfsServer.proto b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/HdfsServer.proto |
| index 78607efddab..85cfb6c0d2e 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/HdfsServer.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/HdfsServer.proto |
| @@ -24,7 +24,7 @@ |
| |
| // This file contains protocol buffers that are used throughout HDFS -- i.e. |
| // by the client, server, and data transfer protocols. |
| -syntax = "proto2"; |
| + |
| |
| option java_package = "org.apache.hadoop.hdfs.protocol.proto"; |
| option java_outer_classname = "HdfsServerProtos"; |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/InterDatanodeProtocol.proto b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/InterDatanodeProtocol.proto |
| index 47332a8817b..580f8d34730 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/InterDatanodeProtocol.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/InterDatanodeProtocol.proto |
| @@ -24,7 +24,7 @@ |
| |
| // This file contains protocol buffers that are used throughout HDFS -- i.e. |
| // by the client, server, and data transfer protocols. |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.hdfs.protocol.proto"; |
| option java_outer_classname = "InterDatanodeProtocolProtos"; |
| option java_generic_services = true; |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/InterQJournalProtocol.proto b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/InterQJournalProtocol.proto |
| index e73ca23e92f..0ecdff1d372 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/InterQJournalProtocol.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/InterQJournalProtocol.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.hdfs.qjournal.protocol"; |
| option java_outer_classname = "InterQJournalProtocolProtos"; |
| option java_generic_services = true; |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/JournalProtocol.proto b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/JournalProtocol.proto |
| index 35c401e33e5..3fd029b7362 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/JournalProtocol.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/JournalProtocol.proto |
| @@ -24,7 +24,7 @@ |
| |
| // This file contains protocol buffers that are used throughout HDFS -- i.e. |
| // by the client, server, and data transfer protocols. |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.hdfs.protocol.proto"; |
| option java_outer_classname = "JournalProtocolProtos"; |
| option java_generic_services = true; |
| 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 97f5bcaf61f..89edfbf2ea6 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/NamenodeProtocol.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/NamenodeProtocol.proto |
| @@ -24,7 +24,7 @@ |
| |
| // This file contains protocol buffers that are used throughout HDFS -- i.e. |
| // by the client, server, and data transfer protocols. |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.hdfs.protocol.proto"; |
| option java_outer_classname = "NamenodeProtocolProtos"; |
| option java_generic_services = true; |
| 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 e366d1fb8d7..b4d2b312f99 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/QJournalProtocol.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/QJournalProtocol.proto |
| @@ -21,7 +21,7 @@ |
| * Please see http://wiki.apache.org/hadoop/Compatibility |
| * for what changes are allowed for a *stable* .proto interface. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.hdfs.qjournal.protocol"; |
| option java_outer_classname = "QJournalProtocolProtos"; |
| option java_generic_services = true; |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/editlog.proto b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/editlog.proto |
| index 22fd7437bb8..f25fe591ad3 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/editlog.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/editlog.proto |
| @@ -15,7 +15,7 @@ |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.hdfs.protocol.proto"; |
| option java_outer_classname = "EditLogProtos"; |
| option java_generate_equals_and_hash = true; |
| diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/fsimage.proto b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/fsimage.proto |
| index 532aa6e2707..d943dbccd64 100644 |
| --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/fsimage.proto |
| +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/proto/fsimage.proto |
| @@ -15,7 +15,7 @@ |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| -syntax = "proto2"; |
| + |
| option java_package = "org.apache.hadoop.hdfs.server.namenode"; |
| option java_outer_classname = "FsImageProto"; |
| |
| diff --git a/hadoop-project/pom.xml b/hadoop-project/pom.xml |
| index e76347962b2..a5e7a8f4121 100644 |
| --- a/hadoop-project/pom.xml |
| +++ b/hadoop-project/pom.xml |
| @@ -1649,56 +1649,9 @@ |
| <artifactId>hadoop-maven-plugins</artifactId> |
| <version>${hadoop.version}</version> |
| </plugin> |
| - <plugin> |
| - <groupId>org.xolstice.maven.plugins</groupId> |
| - <artifactId>protobuf-maven-plugin</artifactId> |
| - <version>${protobuf-maven-plugin.version}</version> |
| - <extensions>true</extensions> |
| - <configuration> |
| - <protocArtifact> |
| - com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier} |
| - </protocArtifact> |
| - <attachProtoSources>false</attachProtoSources> |
| - </configuration> |
| - <executions> |
| - <execution> |
| - <id>src-compile-protoc</id> |
| - <phase>generate-sources</phase> |
| - <goals> |
| - <goal>compile</goal> |
| - </goals> |
| - <configuration> |
| - <includeDependenciesInDescriptorSet>false</includeDependenciesInDescriptorSet> |
| - <protoSourceRoot>${basedir}/src/main/proto</protoSourceRoot> |
| - <outputDirectory>${project.build.directory}/generated-sources/java</outputDirectory> |
| - <clearOutputDirectory>false</clearOutputDirectory> |
| - <skip>true</skip> |
| - </configuration> |
| - </execution> |
| - <execution> |
| - <id>src-test-compile-protoc</id> |
| - <phase>generate-test-sources</phase> |
| - <goals> |
| - <goal>test-compile</goal> |
| - </goals> |
| - <configuration> |
| - <protoTestSourceRoot>${basedir}/src/test/proto</protoTestSourceRoot> |
| - <outputDirectory>${project.build.directory}/generated-test-sources/java</outputDirectory> |
| - <clearOutputDirectory>false</clearOutputDirectory> |
| - <skip>true</skip> |
| - </configuration> |
| - </execution> |
| - </executions> |
| - </plugin> |
| </plugins> |
| </pluginManagement> |
| - <extensions> |
| - <extension> |
| - <groupId>kr.motd.maven</groupId> |
| - <artifactId>os-maven-plugin</artifactId> |
| - <version>${os-maven-plugin.version}</version> |
| - </extension> |
| - </extensions> |
| + |
| <plugins> |
| <plugin> |
| <artifactId>maven-clean-plugin</artifactId> |