You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/07/13 08:33:11 UTC

[GitHub] [ozone] mukul1987 opened a new pull request #2410: HDDS-5431. compile both proto2 and proto3 versions of Client to OM interaction proto files.

mukul1987 opened a new pull request #2410:
URL: https://github.com/apache/ozone/pull/2410


   ## What changes were proposed in this pull request?
   For Ozone to work with both hadoop2 and pre hadoop 3.3 versions, it needs to compile both proto2 and proto3 versions of the protofiles
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-5431
   
   ## How was this patch tested?
   Build succeeds and current tests pass
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] mukul1987 merged pull request #2410: HDDS-5431. compile both proto2 and proto3 versions of Client to OM interaction proto files.

Posted by GitBox <gi...@apache.org>.
mukul1987 merged pull request #2410:
URL: https://github.com/apache/ozone/pull/2410


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] mukul1987 commented on a change in pull request #2410: HDDS-5431. compile both proto2 and proto3 versions of Client to OM interaction proto files.

Posted by GitBox <gi...@apache.org>.
mukul1987 commented on a change in pull request #2410:
URL: https://github.com/apache/ozone/pull/2410#discussion_r669738541



##########
File path: hadoop-ozone/interface-client/pom.xml
##########
@@ -63,6 +63,59 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
               </protocArtifact>
             </configuration>
           </execution>
+          <execution>
+            <id>compile-protoc3</id>
+            <goals>
+              <goal>compile</goal>
+              <goal>test-compile</goal>
+            </goals>
+            <configuration>
+              <protoSourceRoot>${basedir}/src/main/proto/</protoSourceRoot>
+              <protocArtifact>
+                com.google.protobuf:protoc:${proto3.hadooprpc.protobuf.version}:exe:${os.detected.classifier}
+              </protocArtifact>
+              <outputDirectory>target/generated-sources/protobuf/java/proto3</outputDirectory>
+              <clearOutputDirectory>false</clearOutputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>generate-sources</phase>
+            <configuration>
+              <tasks>
+                <replace token="com.google.protobuf"
+                         value="org.apache.hadoop.thirdparty.protobuf"
+                         dir="target/generated-sources/protobuf/java/proto3/org/apache/hadoop/ozone/protocol/proto">
+                </replace>
+                <replace token="com.google.protobuf"
+                         value="org.apache.hadoop.thirdparty.protobuf"
+                         dir="target/generated-sources/protobuf/java/proto3/org/apache/hadoop/ozone/security/proto">
+                </replace>
+                <replace token="org.apache.hadoop.ozone.protocol.proto"
+                         value="org.apache.hadoop.ozone.protocol.proto3"
+                         dir="target/generated-sources/protobuf/java/proto3/org/apache/hadoop/ozone/protocol/proto">

Review comment:
       thanks, done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] mukul1987 commented on a change in pull request #2410: HDDS-5431. compile both proto2 and proto3 versions of Client to OM interaction proto files.

Posted by GitBox <gi...@apache.org>.
mukul1987 commented on a change in pull request #2410:
URL: https://github.com/apache/ozone/pull/2410#discussion_r669257505



##########
File path: hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/VersionInfo.java
##########
@@ -85,8 +85,12 @@ public String getSrcChecksum() {
     return info.getProperty("srcChecksum", "Unknown");
   }
 
-  public String getHadoopProtocVersion() {

Review comment:
       done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on a change in pull request #2410: HDDS-5431. compile both proto2 and proto3 versions of Client to OM interaction proto files.

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on a change in pull request #2410:
URL: https://github.com/apache/ozone/pull/2410#discussion_r669695030



##########
File path: hadoop-ozone/interface-client/pom.xml
##########
@@ -63,6 +63,59 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
               </protocArtifact>
             </configuration>
           </execution>
+          <execution>
+            <id>compile-protoc3</id>
+            <goals>
+              <goal>compile</goal>
+              <goal>test-compile</goal>
+            </goals>
+            <configuration>
+              <protoSourceRoot>${basedir}/src/main/proto/</protoSourceRoot>
+              <protocArtifact>
+                com.google.protobuf:protoc:${proto3.hadooprpc.protobuf.version}:exe:${os.detected.classifier}
+              </protocArtifact>
+              <outputDirectory>target/generated-sources/protobuf/java/proto3</outputDirectory>
+              <clearOutputDirectory>false</clearOutputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>generate-sources</phase>
+            <configuration>
+              <tasks>
+                <replace token="com.google.protobuf"
+                         value="org.apache.hadoop.thirdparty.protobuf"
+                         dir="target/generated-sources/protobuf/java/proto3/org/apache/hadoop/ozone/protocol/proto">
+                </replace>
+                <replace token="com.google.protobuf"
+                         value="org.apache.hadoop.thirdparty.protobuf"
+                         dir="target/generated-sources/protobuf/java/proto3/org/apache/hadoop/ozone/security/proto">
+                </replace>
+                <replace token="org.apache.hadoop.ozone.protocol.proto"
+                         value="org.apache.hadoop.ozone.protocol.proto3"
+                         dir="target/generated-sources/protobuf/java/proto3/org/apache/hadoop/ozone/protocol/proto">

Review comment:
       In addition to renaming the package, I think the files should be moved to `org/apache/hadoop/ozone/protocol/proto3`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on a change in pull request #2410: HDDS-5431. compile both proto2 and proto3 versions of Client to OM interaction proto files.

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on a change in pull request #2410:
URL: https://github.com/apache/ozone/pull/2410#discussion_r669695030



##########
File path: hadoop-ozone/interface-client/pom.xml
##########
@@ -63,6 +63,59 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd">
               </protocArtifact>
             </configuration>
           </execution>
+          <execution>
+            <id>compile-protoc3</id>
+            <goals>
+              <goal>compile</goal>
+              <goal>test-compile</goal>
+            </goals>
+            <configuration>
+              <protoSourceRoot>${basedir}/src/main/proto/</protoSourceRoot>
+              <protocArtifact>
+                com.google.protobuf:protoc:${proto3.hadooprpc.protobuf.version}:exe:${os.detected.classifier}
+              </protocArtifact>
+              <outputDirectory>target/generated-sources/protobuf/java/proto3</outputDirectory>
+              <clearOutputDirectory>false</clearOutputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>generate-sources</phase>
+            <configuration>
+              <tasks>
+                <replace token="com.google.protobuf"
+                         value="org.apache.hadoop.thirdparty.protobuf"
+                         dir="target/generated-sources/protobuf/java/proto3/org/apache/hadoop/ozone/protocol/proto">
+                </replace>
+                <replace token="com.google.protobuf"
+                         value="org.apache.hadoop.thirdparty.protobuf"
+                         dir="target/generated-sources/protobuf/java/proto3/org/apache/hadoop/ozone/security/proto">
+                </replace>
+                <replace token="org.apache.hadoop.ozone.protocol.proto"
+                         value="org.apache.hadoop.ozone.protocol.proto3"
+                         dir="target/generated-sources/protobuf/java/proto3/org/apache/hadoop/ozone/protocol/proto">

Review comment:
       In addition to renaming the package, I think the files should be moved to `org/apache/hadoop/ozone/protocol/proto3`.  Something like this in the Ant task:
   
   ```
   <move file="target/generated-sources/java/proto3/org/apache/hadoop/hdds/protocol/proto"
     tofile="target/generated-sources/java/proto3/org/apache/hadoop/hdds/protocol/proto3"/>
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] adoroszlai commented on a change in pull request #2410: HDDS-5431. compile both proto2 and proto3 versions of Client to OM interaction proto files.

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on a change in pull request #2410:
URL: https://github.com/apache/ozone/pull/2410#discussion_r668620218



##########
File path: hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/utils/VersionInfo.java
##########
@@ -85,8 +85,12 @@ public String getSrcChecksum() {
     return info.getProperty("srcChecksum", "Unknown");
   }
 
-  public String getHadoopProtocVersion() {

Review comment:
       This class is marked `Public` and `Stable`, I guess we should keep this method for compatibility.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org