adoroszlai commented on code in PR #10305:
URL: https://github.com/apache/ozone/pull/10305#discussion_r3264687933


##########
pom.xml:
##########
@@ -2633,5 +2633,126 @@
         </plugins>
       </build>
     </profile>
+    <profile>
+      <id>native</id>
+      <activation>
+        <os>
+          <family>linux</family>
+          <arch>x86_64</arch>
+        </os>
+        <property>
+          <name>fetch-native-hadoop</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>com.googlecode.maven-download-plugin</groupId>
+            <artifactId>download-maven-plugin</artifactId>
+            <version>1.6.8</version>
+            <inherited>false</inherited>
+            <executions>
+              <execution>
+                <id>fetch-hadoop-native-tar</id>
+                <goals>
+                  <goal>wget</goal>
+                </goals>
+                <phase>generate-resources</phase>
+                <configuration>
+                  
<url>https://archive.apache.org/dist/hadoop/common/hadoop-${hadoop.version}/hadoop-${hadoop.version}.tar.gz</url>
+                  <unpack>true</unpack>
+                  
<outputDirectory>${project.build.directory}/hadoop-bin</outputDirectory>
+                  <skipCache>false</skipCache>
+                  <overwrite>false</overwrite>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <version>3.1.0</version>

Review Comment:
   ```suggestion
   ```



##########
pom.xml:
##########
@@ -2633,5 +2633,126 @@
         </plugins>
       </build>
     </profile>
+    <profile>
+      <id>native</id>
+      <activation>
+        <os>
+          <family>linux</family>
+          <arch>x86_64</arch>
+        </os>
+        <property>
+          <name>fetch-native-hadoop</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>com.googlecode.maven-download-plugin</groupId>
+            <artifactId>download-maven-plugin</artifactId>
+            <version>1.6.8</version>

Review Comment:
   Version (newer one) already defined.
   
   ```suggestion
   ```



##########
pom.xml:
##########
@@ -2633,5 +2633,126 @@
         </plugins>
       </build>
     </profile>
+    <profile>
+      <id>native</id>
+      <activation>
+        <os>
+          <family>linux</family>
+          <arch>x86_64</arch>
+        </os>
+        <property>
+          <name>fetch-native-hadoop</name>
+        </property>
+      </activation>

Review Comment:
   Release manager may be using Mac or Linux, but needs to create package with 
lib for all supported platforms.  I think these download/extract steps should 
be moved to existing `dist` profile (preferably in `hadoop-ozone/dist/pom.xml`).



##########
pom.xml:
##########
@@ -2633,5 +2633,126 @@
         </plugins>
       </build>
     </profile>
+    <profile>
+      <id>native</id>
+      <activation>
+        <os>
+          <family>linux</family>
+          <arch>x86_64</arch>
+        </os>
+        <property>
+          <name>fetch-native-hadoop</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>com.googlecode.maven-download-plugin</groupId>
+            <artifactId>download-maven-plugin</artifactId>
+            <version>1.6.8</version>
+            <inherited>false</inherited>
+            <executions>
+              <execution>
+                <id>fetch-hadoop-native-tar</id>
+                <goals>
+                  <goal>wget</goal>
+                </goals>
+                <phase>generate-resources</phase>
+                <configuration>
+                  
<url>https://archive.apache.org/dist/hadoop/common/hadoop-${hadoop.version}/hadoop-${hadoop.version}.tar.gz</url>

Review Comment:
   We should not download 500MB tarball for each build.  Need to find a way to 
get these libs with less overhead.



##########
pom.xml:
##########
@@ -2633,5 +2633,126 @@
         </plugins>
       </build>
     </profile>
+    <profile>
+      <id>native</id>
+      <activation>
+        <os>
+          <family>linux</family>
+          <arch>x86_64</arch>
+        </os>
+        <property>
+          <name>fetch-native-hadoop</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>com.googlecode.maven-download-plugin</groupId>
+            <artifactId>download-maven-plugin</artifactId>
+            <version>1.6.8</version>
+            <inherited>false</inherited>
+            <executions>
+              <execution>
+                <id>fetch-hadoop-native-tar</id>
+                <goals>
+                  <goal>wget</goal>
+                </goals>
+                <phase>generate-resources</phase>
+                <configuration>
+                  
<url>https://archive.apache.org/dist/hadoop/common/hadoop-${hadoop.version}/hadoop-${hadoop.version}.tar.gz</url>
+                  <unpack>true</unpack>
+                  
<outputDirectory>${project.build.directory}/hadoop-bin</outputDirectory>
+                  <skipCache>false</skipCache>
+                  <overwrite>false</overwrite>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <version>3.1.0</version>
+            <inherited>false</inherited>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+                <phase>prepare-package</phase>
+                <configuration>
+                  <target>
+                    <mkdir dir="${project.build.directory}/native-lib" />
+                    <exec executable="bash" failonerror="true">
+                      <arg value="-c" />
+                      <arg value="cp -P 
${project.build.directory}/hadoop-bin/hadoop-*/lib/native/libhadoop.so* 
${project.build.directory}/native-lib/" />
+                    </exec>
+                  </target>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>native-mac</id>
+      <activation>
+        <os>
+          <family>mac</family>
+          <arch>aarch64</arch>
+        </os>
+        <property>
+          <name>fetch-native-hadoop</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>com.googlecode.maven-download-plugin</groupId>
+            <artifactId>download-maven-plugin</artifactId>
+            <version>1.6.8</version>

Review Comment:
   ```suggestion
   ```



##########
pom.xml:
##########
@@ -2633,5 +2633,126 @@
         </plugins>
       </build>
     </profile>
+    <profile>
+      <id>native</id>
+      <activation>
+        <os>
+          <family>linux</family>
+          <arch>x86_64</arch>
+        </os>
+        <property>
+          <name>fetch-native-hadoop</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>com.googlecode.maven-download-plugin</groupId>
+            <artifactId>download-maven-plugin</artifactId>
+            <version>1.6.8</version>
+            <inherited>false</inherited>
+            <executions>
+              <execution>
+                <id>fetch-hadoop-native-tar</id>
+                <goals>
+                  <goal>wget</goal>
+                </goals>
+                <phase>generate-resources</phase>
+                <configuration>
+                  
<url>https://archive.apache.org/dist/hadoop/common/hadoop-${hadoop.version}/hadoop-${hadoop.version}.tar.gz</url>
+                  <unpack>true</unpack>
+                  
<outputDirectory>${project.build.directory}/hadoop-bin</outputDirectory>
+                  <skipCache>false</skipCache>
+                  <overwrite>false</overwrite>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <version>3.1.0</version>
+            <inherited>false</inherited>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+                <phase>prepare-package</phase>
+                <configuration>
+                  <target>
+                    <mkdir dir="${project.build.directory}/native-lib" />
+                    <exec executable="bash" failonerror="true">
+                      <arg value="-c" />
+                      <arg value="cp -P 
${project.build.directory}/hadoop-bin/hadoop-*/lib/native/libhadoop.so* 
${project.build.directory}/native-lib/" />
+                    </exec>
+                  </target>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>native-mac</id>
+      <activation>
+        <os>
+          <family>mac</family>
+          <arch>aarch64</arch>
+        </os>
+        <property>
+          <name>fetch-native-hadoop</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>com.googlecode.maven-download-plugin</groupId>
+            <artifactId>download-maven-plugin</artifactId>
+            <version>1.6.8</version>
+            <inherited>false</inherited>
+            <executions>
+              <execution>
+                <id>fetch-mac-binary</id>
+                <goals>
+                  <goal>wget</goal>
+                </goals>
+                <phase>generate-resources</phase>
+                <configuration>
+                  <!-- TODO: change ChenSammi to apache after 
https://github.com/apache/ozone-docker-runner/pull/66 is merged-->
+                  
<url>https://raw.githubusercontent.com/ChenSammi/ozone-docker-runner/master/hadoop-native-lib/Mac_OS_X-aarch64/${hadoop.version}/libhadoop.1.0.0.dylib</url>
+                  <unpack>false</unpack>
+                  
<outputDirectory>${project.build.directory}/native-lib</outputDirectory>
+                  <skipCache>false</skipCache>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <version>3.1.0</version>

Review Comment:
   ```suggestion
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to