This is an automated email from the ASF dual-hosted git repository.

shashikant pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 159fb24  HDDS-5304. InterSCM protocol should be server-only (#2305)
159fb24 is described below

commit 159fb248aeb5c0757519a801d4180e22ef76e911
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Thu Jun 10 06:50:28 2021 +0200

    HDDS-5304. InterSCM protocol should be server-only (#2305)
---
 hadoop-hdds/interface-client/pom.xml               |  1 -
 .../dev-support/findbugsExcludeFile.xml            |  3 ++
 hadoop-hdds/interface-server/pom.xml               | 54 ++++++++++++++++++++++
 .../src/main/proto/InterSCMProtocol.proto          |  0
 4 files changed, 57 insertions(+), 1 deletion(-)

diff --git a/hadoop-hdds/interface-client/pom.xml 
b/hadoop-hdds/interface-client/pom.xml
index 4794eef..6ec7425 100644
--- a/hadoop-hdds/interface-client/pom.xml
+++ b/hadoop-hdds/interface-client/pom.xml
@@ -71,7 +71,6 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd";>
               <protoSourceRoot>${basedir}/src/main/proto/</protoSourceRoot>
               <includes>
                 <include>DatanodeClientProtocol.proto</include>
-                <include>InterSCMProtocol.proto</include>
                 <include>SCMClientProtocol.proto</include>
                 <include>SCMUpdateProtocol.proto</include>
               </includes>
diff --git a/hadoop-hdds/interface-server/dev-support/findbugsExcludeFile.xml 
b/hadoop-hdds/interface-server/dev-support/findbugsExcludeFile.xml
index 3571a89..ca646e2 100644
--- a/hadoop-hdds/interface-server/dev-support/findbugsExcludeFile.xml
+++ b/hadoop-hdds/interface-server/dev-support/findbugsExcludeFile.xml
@@ -18,4 +18,7 @@
   <Match>
     <Package name="org.apache.hadoop.hdds.protocol.proto"/>
   </Match>
+  <Match>
+    <Package name="org.apache.hadoop.hdds.protocol.scm.proto"/>
+  </Match>
 </FindBugsFilter>
diff --git a/hadoop-hdds/interface-server/pom.xml 
b/hadoop-hdds/interface-server/pom.xml
index 442ed82..3ecd715 100644
--- a/hadoop-hdds/interface-server/pom.xml
+++ b/hadoop-hdds/interface-server/pom.xml
@@ -54,6 +54,30 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd";>
         <extensions>true</extensions>
         <executions>
           <execution>
+            <id>compile-protoc-3</id>
+            <goals>
+              <goal>compile</goal>
+              <goal>test-compile</goal>
+              <goal>compile-custom</goal>
+              <goal>test-compile-custom</goal>
+            </goals>
+            <configuration>
+              <protocArtifact>
+                
com.google.protobuf:protoc:${protobuf-compile.version}:exe:${os.detected.classifier}
+              </protocArtifact>
+              <protoSourceRoot>${basedir}/src/main/proto/</protoSourceRoot>
+              <includes>
+                <include>InterSCMProtocol.proto</include>
+              </includes>
+              <outputDirectory>target/generated-sources/java</outputDirectory>
+              <clearOutputDirectory>false</clearOutputDirectory>
+              <pluginId>grpc-java</pluginId>
+              <pluginArtifact>
+                
io.grpc:protoc-gen-grpc-java:${grpc-compile.version}:exe:${os.detected.classifier}
+              </pluginArtifact>
+            </configuration>
+          </execution>
+          <execution>
             <id>compile-protoc-2</id>
             <goals>
               <goal>compile</goal>
@@ -64,6 +88,9 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd";>
                 
com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}
               </protocArtifact>
               <protoSourceRoot>${basedir}/src/main/proto/</protoSourceRoot>
+              <excludes>
+                <exclude>InterSCMProtocol.proto</exclude>
+              </excludes>
               <outputDirectory>target/generated-sources/java</outputDirectory>
               <clearOutputDirectory>false</clearOutputDirectory>
             </configuration>
@@ -71,6 +98,33 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd";>
         </executions>
       </plugin>
       <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>generate-sources</phase>
+            <configuration>
+              <tasks>
+                <replace token="com.google.protobuf"
+                         
value="org.apache.ratis.thirdparty.com.google.protobuf"
+                         
dir="target/generated-sources/java/org/apache/hadoop/hdds/protocol/scm/proto">
+                </replace>
+                <replace token="io.grpc"
+                         value="org.apache.ratis.thirdparty.io.grpc"
+                         
dir="target/generated-sources/java/org/apache/hadoop/hdds/protocol/scm/proto">
+                </replace>
+                <replace token="com.google.common"
+                         value="org.apache.ratis.thirdparty.com.google.common"
+                         
dir="target/generated-sources/java/org/apache/hadoop/hdds/protocol/scm/proto">
+                </replace>
+              </tasks>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
         <groupId>com.github.spotbugs</groupId>
         <artifactId>spotbugs-maven-plugin</artifactId>
         <configuration>
diff --git a/hadoop-hdds/interface-client/src/main/proto/InterSCMProtocol.proto 
b/hadoop-hdds/interface-server/src/main/proto/InterSCMProtocol.proto
similarity index 100%
rename from hadoop-hdds/interface-client/src/main/proto/InterSCMProtocol.proto
rename to hadoop-hdds/interface-server/src/main/proto/InterSCMProtocol.proto

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to