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

adoroszlai pushed a commit to branch HDDS-10685
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/HDDS-10685 by this push:
     new 2f90c1731a3 HDDS-15404. Enable short-circuit unit test in CI (#10377)
2f90c1731a3 is described below

commit 2f90c1731a3c45531fb65d8949615625837fc81e
Author: Sammi Chen <[email protected]>
AuthorDate: Sat Jun 6 01:33:21 2026 +0800

    HDDS-15404. Enable short-circuit unit test in CI (#10377)
---
 .github/workflows/ci.yml                           |   2 +-
 .../server/XceiverServerDomainSocket.java          |   9 +-
 hadoop-ozone/integration-test/pom.xml              |  11 ++
 .../{scm => }/TestXceiverServerDomainSocket.java   |  46 ++-----
 .../hdds/scm/TestXceiverClientManagerSC.java       |   9 +-
 .../client/rpc/read/TestDomainSocketFactory.java   |   7 +-
 ...tStream.java => TestLocalChunkInputStream.java} |  10 +-
 pom.xml                                            | 141 +++++++++++++--------
 8 files changed, 134 insertions(+), 101 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 68348c9e5f4..8999b6019d1 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -340,7 +340,7 @@ jobs:
       pre-script: sudo hostname localhost
       ratis-args: ${{ inputs.ratis_args }}
       script: integration
-      script-args: -Ptest-${{ matrix.profile }} -Drocks_tools_native
+      script-args: -Ptest-${{ matrix.profile }} -Phadoop-native-lib 
-Drocks_tools_native
       sha: ${{ needs.build-info.outputs.sha }}
       split: ${{ matrix.profile }}
       timeout-minutes: 90
diff --git 
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/XceiverServerDomainSocket.java
 
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/XceiverServerDomainSocket.java
index 2c1b19ad5bf..6207d8cbe6e 100644
--- 
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/XceiverServerDomainSocket.java
+++ 
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/XceiverServerDomainSocket.java
@@ -21,9 +21,9 @@
 import java.io.IOException;
 import java.net.SocketTimeoutException;
 import java.nio.channels.AsynchronousCloseException;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Objects;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
@@ -69,8 +69,8 @@ public final class XceiverServerDomainSocket implements 
XceiverServerSpi, Runnab
   private DomainSocket domainSocket;
   private final ConfigurationSource config;
   private final String threadPrefix;
-  private final HashMap<DomainPeer, Thread> peers = new HashMap<>();
-  private final HashMap<DomainPeer, Receiver> peersReceiver = new HashMap<>();
+  private final ConcurrentHashMap<DomainPeer, Thread> peers = new 
ConcurrentHashMap<>();
+  private final ConcurrentHashMap<DomainPeer, Receiver> peersReceiver = new 
ConcurrentHashMap<>();
   private int readTimeoutMs;
   private int writeTimeoutMs;
   private final ThreadPoolExecutor readExecutors;
@@ -162,8 +162,7 @@ public void stop() {
       if (server != null) {
         try {
           if (domainSocket != null) {
-            // TODO: once HADOOP-19261 is merged, change it to 
domainSocket.close(true);
-            domainSocket.close();
+            domainSocket.close(true);
             LOG.info("UNIX domain socket server listening on {} is stopped", 
domainSocket.getPath());
           }
         } catch (IOException e) {
diff --git a/hadoop-ozone/integration-test/pom.xml 
b/hadoop-ozone/integration-test/pom.xml
index 6c1ccb94f58..edc60bd8dc3 100644
--- a/hadoop-ozone/integration-test/pom.xml
+++ b/hadoop-ozone/integration-test/pom.xml
@@ -571,6 +571,17 @@
           <proc>none</proc>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <argLine>${maven-surefire-plugin.argLine} 
${maven-surefire-plugin.argLineAccessArgs} @{argLine} 
-Djava.library.path=${project.basedir}/../../target/native-lib</argLine>
+          <environmentVariables>
+            
<LD_LIBRARY_PATH>${project.basedir}/../../target/native-lib</LD_LIBRARY_PATH>
+            
<DYLD_LIBRARY_PATH>${project.basedir}/../../target/native-lib</DYLD_LIBRARY_PATH>
+          </environmentVariables>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 
diff --git 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestXceiverServerDomainSocket.java
 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/TestXceiverServerDomainSocket.java
similarity index 95%
rename from 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestXceiverServerDomainSocket.java
rename to 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/TestXceiverServerDomainSocket.java
index 1d5e88cb292..fc134b0c7c1 100644
--- 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestXceiverServerDomainSocket.java
+++ 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/TestXceiverServerDomainSocket.java
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.hadoop.hdds.scm;
+package org.apache.hadoop.hdds;
 
 import static 
org.apache.hadoop.hdds.protocol.MockDatanodeDetails.randomDatanodeDetails;
 import static 
org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos.Type.GetBlock;
@@ -59,6 +59,8 @@
 import org.apache.hadoop.hdds.protocol.DatanodeDetails;
 import org.apache.hadoop.hdds.protocol.MockDatanodeDetails;
 import org.apache.hadoop.hdds.protocol.datanode.proto.ContainerProtos;
+import org.apache.hadoop.hdds.scm.OzoneClientConfig;
+import org.apache.hadoop.hdds.scm.ScmConfigKeys;
 import org.apache.hadoop.hdds.scm.pipeline.MockPipeline;
 import org.apache.hadoop.hdds.scm.pipeline.Pipeline;
 import org.apache.hadoop.hdds.scm.storage.DomainSocketFactory;
@@ -86,7 +88,6 @@
 import org.apache.hadoop.ozone.container.ozoneimpl.OzoneContainer;
 import org.apache.hadoop.utils.FaultInjectorImpl;
 import org.apache.ozone.test.GenericTestUtils;
-import org.apache.ozone.test.tag.Unhealthy;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.Timeout;
@@ -96,6 +97,11 @@
 
 /**
  * Tests the XceiverServerDomainSocket class.
+ * Add Environment variables
+ *   LD_LIBRARY_PATH=$PROJECT_DIR$/target/native-lib
+ *   DYLD_LIBRARY_PATH=$PROJECT_DIR$/target/native-lib
+ *   to intellij run configuration to run it locally.
+ *   Dynamically set the java.library.path in java code doesn't affect the 
library loading
  */
 @Timeout(300)
 public class TestXceiverServerDomainSocket {
@@ -120,6 +126,7 @@ public static void setup() {
     OzoneClientConfig clientConfig = conf.getObject(OzoneClientConfig.class);
     clientConfig.setShortCircuit(true);
     clientConfig.setShortCircuitReadDisableInterval(1000);
+    DomainSocket.disableBindPathValidation();
     conf.setFromObject(clientConfig);
     metrics = ContainerMetrics.create(conf);
     readTimeout = 5 * 1000;
@@ -128,7 +135,6 @@ public static void setup() {
   }
 
   @Test
-  @Unhealthy("Run it locally since it requires libhadoop.so.")
   public void testIllegalDomainPathConfiguration() {
     // empty domain path
     conf.set(OzoneClientConfig.OZONE_DOMAIN_SOCKET_PATH, "");
@@ -140,39 +146,23 @@ public void testIllegalDomainPathConfiguration() {
       assertTrue(e.getMessage().contains("ozone.domain.socket.path is not 
set"));
     }
 
-    // Domain path too long
-    conf.set(OzoneClientConfig.OZONE_DOMAIN_SOCKET_PATH,
-        new File(dir, "ozone-datanode-socket-" + 
System.nanoTime()).getAbsolutePath());
-    DomainSocketFactory factory = DomainSocketFactory.getInstance(conf);
-    try {
-      new 
XceiverServerDomainSocket(MockDatanodeDetails.randomDatanodeDetails(),
-          conf, null, readExecutors, metrics, factory);
-      fail("Domain path is too long.");
-    } catch (Throwable e) {
-      assertTrue(e.getCause() instanceof SocketException);
-      assertTrue(e.getMessage().contains("path too long"));
-    } finally {
-      factory.close();
-    }
-
     // non-existing domain parent path
     conf.set(OzoneClientConfig.OZONE_DOMAIN_SOCKET_PATH,
         new File(dir.getAbsolutePath() + System.nanoTime(), 
"ozone-socket").getAbsolutePath());
-    factory = DomainSocketFactory.getInstance(conf);
+    DomainSocketFactory factory = DomainSocketFactory.getInstance(conf);
     try {
       new 
XceiverServerDomainSocket(MockDatanodeDetails.randomDatanodeDetails(),
           conf, null, readExecutors, metrics, factory);
       fail("non-existing domain parent path.");
     } catch (Throwable e) {
       assertTrue(e.getCause() instanceof IOException);
-      assertTrue(e.getMessage().contains("failed to stat a path component"));
+      assertTrue(e.getMessage().contains("No such file or directory"));
     } finally {
       factory.close();
     }
   }
 
   @Test
-  @Unhealthy("Run it locally since it requires libhadoop.so.")
   public void testExistingDomainPath() {
     // an existing domain path, the existing file is override and changed from 
a normal file to a socket file
     conf.set(OzoneClientConfig.OZONE_DOMAIN_SOCKET_PATH, new File(dir, 
"ozone-socket").getAbsolutePath());
@@ -189,8 +179,9 @@ public void testExistingDomainPath() {
     }
   }
 
-  @Test
-  @Unhealthy("Run it locally since it requires libhadoop.so.")
+  /**
+   * This can be run locally instead of CI, without call 
DomainSocket.disableBindPathValidation().
+   */
   public void testDomainPathPermission() {
     // write from everyone is not allowed (permission too open)
     assertTrue(dir.setWritable(true, false));
@@ -287,7 +278,6 @@ public void testDomainPathPermission() {
    * On Linux, when there is still open file handle of a deleted file, the 
file handle remains open and can still
    * be used to read and write the file.
    */
-  @Unhealthy("Run it locally since it requires libhadoop.so.")
   @ParameterizedTest
   @CsvSource({
       "true, true",
@@ -371,7 +361,6 @@ public void testReadWrite(boolean deleteFileBeforeRead, 
boolean deleteFileDuring
    * Test concurrent read/write.
    */
   @Test
-  @Unhealthy("Run it locally since it requires libhadoop.so.")
   public void testConcurrentReadWrite() throws IOException {
     conf.set(OzoneClientConfig.OZONE_DOMAIN_SOCKET_PATH, new File(dir, 
"ozone-socket").getAbsolutePath());
     ContainerMetrics containerMetrics = ContainerMetrics.create(conf);
@@ -467,7 +456,6 @@ public void testConcurrentReadWrite() throws IOException {
    * Test server is not listening.
    */
   @Test
-  @Unhealthy("Run it locally since it requires libhadoop.so.")
   public void testServerNotListening() {
     conf.set(OzoneClientConfig.OZONE_DOMAIN_SOCKET_PATH, new File(dir, 
"ozone-socket").getAbsolutePath());
     DomainSocketFactory factory = DomainSocketFactory.getInstance(conf);
@@ -488,7 +476,6 @@ public void testServerNotListening() {
    * Although socket can be created, read will fail, write can succeed.
    */
   @Test
-  @Unhealthy("Run it locally since it requires libhadoop.so.")
   public void testServerNotStart() {
     conf.set(OzoneClientConfig.OZONE_DOMAIN_SOCKET_PATH, new File(dir, 
"ozone-socket").getAbsolutePath());
     DomainSocketFactory factory = DomainSocketFactory.getInstance(conf);
@@ -522,7 +509,6 @@ public void testServerNotStart() {
   }
 
   @Test
-  @Unhealthy("Run it locally since it requires libhadoop.so.")
   public void testReadTimeout() throws InterruptedException {
     conf.set(OzoneClientConfig.OZONE_DOMAIN_SOCKET_PATH, new File(dir, 
"ozone-socket").getAbsolutePath());
     conf.set(OzoneConfigKeys.OZONE_CLIENT_READ_TIMEOUT, "2s");
@@ -558,7 +544,6 @@ public void testReadTimeout() throws InterruptedException {
    * read timeout happens.
    */
   @Test
-  @Unhealthy("Run it locally since it requires libhadoop.so.")
   public void testReceiverDaemonStartSlow() {
     conf.set(OzoneClientConfig.OZONE_DOMAIN_SOCKET_PATH, new File(dir, 
"ozone-socket").getAbsolutePath());
     DomainSocketFactory factory = DomainSocketFactory.getInstance(conf);
@@ -586,7 +571,6 @@ public void testReceiverDaemonStartSlow() {
   }
 
   @Test
-  @Unhealthy("Run it locally since it requires libhadoop.so.")
   public void testMaxXceiverCount() throws IOException, InterruptedException {
     conf.set(OzoneClientConfig.OZONE_DOMAIN_SOCKET_PATH, new File(dir, 
"ozone-socket").getAbsolutePath());
     DatanodeConfiguration datanodeConfiguration = 
conf.getObject(DatanodeConfiguration.class);
@@ -650,7 +634,6 @@ public void testMaxXceiverCount() throws IOException, 
InterruptedException {
    * will treat it as a critical error, close the connection.
    */
   @Test
-  @Unhealthy("Run it locally since it requires libhadoop.so.")
   public void testSendIrrelevantMessage() {
     conf.set(OzoneClientConfig.OZONE_DOMAIN_SOCKET_PATH, new File(dir, 
"ozone-socket").getAbsolutePath());
     DomainSocketFactory factory = DomainSocketFactory.getInstance(conf);
@@ -677,7 +660,6 @@ public void testSendIrrelevantMessage() {
   }
 
   @Test
-  @Unhealthy("Run it locally since it requires libhadoop.so.")
   public void testSendUnsupportedRequest() throws IOException {
     conf.set(OzoneClientConfig.OZONE_DOMAIN_SOCKET_PATH, new File(dir, 
"ozone-socket").getAbsolutePath());
     DomainSocketFactory factory = DomainSocketFactory.getInstance(conf);
diff --git 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestXceiverClientManagerSC.java
 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestXceiverClientManagerSC.java
index 6e60089b006..ff6e49b57ad 100644
--- 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestXceiverClientManagerSC.java
+++ 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/hdds/scm/TestXceiverClientManagerSC.java
@@ -28,10 +28,10 @@
 import 
org.apache.hadoop.hdds.scm.container.common.helpers.ContainerWithPipeline;
 import 
org.apache.hadoop.hdds.scm.protocolPB.StorageContainerLocationProtocolClientSideTranslatorPB;
 import org.apache.hadoop.io.IOUtils;
+import org.apache.hadoop.net.unix.DomainSocket;
 import org.apache.hadoop.ozone.MiniOzoneCluster;
 import org.apache.hadoop.ozone.OzoneConsts;
 import org.apache.hadoop.ozone.container.common.SCMTestUtils;
-import org.apache.ozone.test.tag.Unhealthy;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
@@ -40,6 +40,11 @@
 
 /**
  * Test for short-circuit enabled XceiverClientManager.
+ * Add Environment variables
+ *   LD_LIBRARY_PATH=$PROJECT_DIR$/target/native-lib
+ *   DYLD_LIBRARY_PATH=$PROJECT_DIR$/target/native-lib
+ *   to intellij run configuration to run it locally.
+ *   Dynamically set the java.library.path in java code doesn't affect the 
library loading
  */
 @Timeout(300)
 public class TestXceiverClientManagerSC {
@@ -58,6 +63,7 @@ public static void init() throws Exception {
     clientConfig.setShortCircuit(true);
     config.setFromObject(clientConfig);
     config.set(OzoneClientConfig.OZONE_DOMAIN_SOCKET_PATH, new File(dir, 
"ozone-socket").getAbsolutePath());
+    DomainSocket.disableBindPathValidation();
     cluster = MiniOzoneCluster.newBuilder(config)
         .setNumDatanodes(3)
         .build();
@@ -75,7 +81,6 @@ public static void shutdown() {
   }
 
   @Test
-  @Unhealthy("Run it locally since it requires libhadoop.so.")
   public void testAllocateShortCircuitClient() throws IOException {
     try (XceiverClientManager clientManager = new XceiverClientManager(config,
         config.getObject(ScmClientConfig.class), null)) {
diff --git 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestDomainSocketFactory.java
 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestDomainSocketFactory.java
index bd10bc61766..7fc179b2bcc 100644
--- 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestDomainSocketFactory.java
+++ 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestDomainSocketFactory.java
@@ -25,12 +25,16 @@
 import org.apache.hadoop.hdds.conf.OzoneConfiguration;
 import org.apache.hadoop.hdds.scm.OzoneClientConfig;
 import org.apache.hadoop.hdds.scm.storage.DomainSocketFactory;
-import org.apache.ozone.test.tag.Unhealthy;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.io.TempDir;
 
 /**
  * Tests for {@link DomainSocketFactory}'s functionality.
+ * For local intellij run, please follow the steps below:
+ * Add Environment variables
+ *  LD_LIBRARY_PATH=$PROJECT_DIR$/target/native-lib
+ *  DYLD_LIBRARY_PATH=$PROJECT_DIR$/target/native-lib
+ *  to intellij run configuration.
  */
 public class TestDomainSocketFactory {
 
@@ -56,7 +60,6 @@ private DomainSocketFactory getDomainSocketFactory() {
   }
 
   @Test
-  @Unhealthy("Run it locally since it requires libhadoop.so.")
   public void testShortCircuitDisableTemporary() {
     DomainSocketFactory factory = getDomainSocketFactory();
     try {
diff --git 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestShortCircuitChunkInputStream.java
 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestLocalChunkInputStream.java
similarity index 95%
rename from 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestShortCircuitChunkInputStream.java
rename to 
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestLocalChunkInputStream.java
index 5d0fd16cd6a..f72ddfcae2f 100644
--- 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestShortCircuitChunkInputStream.java
+++ 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/read/TestLocalChunkInputStream.java
@@ -44,7 +44,6 @@
 import org.apache.hadoop.ozone.container.keyvalue.ContainerLayoutTestInfo;
 import org.apache.hadoop.ozone.om.TestBucket;
 import org.apache.ozone.test.GenericTestUtils;
-import org.apache.ozone.test.tag.Unhealthy;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.TestInstance;
 import org.junit.jupiter.api.io.TempDir;
@@ -52,9 +51,14 @@
 
 /**
  * Tests {@link LocalChunkInputStream}.
+ * For local intellij run, please follow the steps below:
+ *  Add Environment variables
+ *  LD_LIBRARY_PATH=$PROJECT_DIR$/target/native-lib
+ *  DYLD_LIBRARY_PATH=$PROJECT_DIR$/target/native-lib
+ *  to intellij run configuration.
  */
 @TestInstance(TestInstance.Lifecycle.PER_CLASS)
-public class TestShortCircuitChunkInputStream extends TestChunkInputStream {
+public class TestLocalChunkInputStream extends TestChunkInputStream {
 
   @TempDir
   private File dir;
@@ -89,7 +93,6 @@ ReplicationConfig getRepConfig() {
    */
   @ContainerLayoutTestInfo.ContainerTest
   @Override
-  @Unhealthy("Run it locally since it requires libhadoop.so.")
   void testAll(ContainerLayoutVersion layout) throws Exception {
     try (OzoneClient client = getCluster().newClient()) {
       updateConfig(layout);
@@ -115,7 +118,6 @@ void testAll(ContainerLayoutVersion layout) throws 
Exception {
   }
 
   @Test
-  @Unhealthy("Run it locally since it requires libhadoop.so.")
   void testFallbackToGrpc() throws Exception {
     try (OzoneClient client = getCluster().newClient()) {
       
assumeTrue(DomainSocketFactory.getInstance(getCluster().getConf()).isServiceReady());
diff --git a/pom.xml b/pom.xml
index 22727c7b22d..eaf638871f8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2607,6 +2607,78 @@
               </execution>
             </executions>
           </plugin>
+          <plugin>
+            <groupId>com.googlecode.maven-download-plugin</groupId>
+            <artifactId>download-maven-plugin</artifactId>
+            <version>${download-maven-plugin.version}</version>
+            <inherited>false</inherited>
+            <executions>
+              <execution>
+                <id>fetch-linux-library</id>
+                <goals>
+                  <goal>wget</goal>
+                </goals>
+                <phase>generate-resources</phase>
+                <configuration>
+                  
<url>https://raw.githubusercontent.com/apache/ozone-thirdparty/master/hadoop-native-lib/${hadoop.version}/libhadoop_linux_x86_64.so</url>
+                  <unpack>false</unpack>
+                  
<outputDirectory>${project.build.directory}/native-lib</outputDirectory>
+                  <skipCache>false</skipCache>
+                </configuration>
+              </execution>
+              <execution>
+                <id>fetch-mac-library</id>
+                <goals>
+                  <goal>wget</goal>
+                </goals>
+                <phase>generate-resources</phase>
+                <configuration>
+                  
<url>https://raw.githubusercontent.com/apache/ozone-thirdparty/master/hadoop-native-lib/${hadoop.version}/libhadoop_osx_aarch_64.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>${maven-antrun-plugin.version}</version>
+            <inherited>false</inherited>
+            <executions>
+              <execution>
+                <id>extract-linux-library</id>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+                <phase>prepare-package</phase>
+                <configuration>
+                  <target>
+                    <exec dir="${project.build.directory}/native-lib" 
executable="bash" failonerror="true">
+                      <arg value="-c" />
+                      <arg value="ln -sf libhadoop_linux_x86_64.so 
libhadoop.so" />
+                    </exec>
+                  </target>
+                </configuration>
+              </execution>
+              <execution>
+                <id>extract-mac-library</id>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+                <phase>prepare-package</phase>
+                <configuration>
+                  <target>
+                    <exec dir="${project.build.directory}/native-lib" 
executable="bash" failonerror="true">
+                      <arg value="-c" />
+                      <arg value="ln -sf libhadoop_osx_aarch_64.dylib 
libhadoop.dylib" />
+                    </exec>
+                  </target>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
         </plugins>
       </build>
     </profile>
@@ -2881,16 +2953,7 @@
       </build>
     </profile>
     <profile>
-      <id>native</id>
-      <activation>
-        <os>
-          <family>linux</family>
-          <arch>x86_64</arch>
-        </os>
-        <property>
-          <name>fetch-native-hadoop</name>
-        </property>
-      </activation>
+      <id>hadoop-native-lib</id>
       <build>
         <plugins>
           <plugin>
@@ -2912,6 +2975,19 @@
                   <skipCache>false</skipCache>
                 </configuration>
               </execution>
+              <execution>
+                <id>fetch-mac-library</id>
+                <goals>
+                  <goal>wget</goal>
+                </goals>
+                <phase>generate-resources</phase>
+                <configuration>
+                  
<url>https://raw.githubusercontent.com/apache/ozone-thirdparty/master/hadoop-native-lib/${hadoop.version}/libhadoop_osx_aarch_64.dylib</url>
+                  <unpack>false</unpack>
+                  
<outputDirectory>${project.build.directory}/native-lib</outputDirectory>
+                  <skipCache>false</skipCache>
+                </configuration>
+              </execution>
             </executions>
           </plugin>
           <plugin>
@@ -2935,51 +3011,6 @@
                   </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>${download-maven-plugin.version}</version>
-            <inherited>false</inherited>
-            <executions>
-              <execution>
-                <id>fetch-mac-library</id>
-                <goals>
-                  <goal>wget</goal>
-                </goals>
-                <phase>generate-resources</phase>
-                <configuration>
-                  
<url>https://raw.githubusercontent.com/apache/ozone-thirdparty/master/hadoop-native-lib/${hadoop.version}/libhadoop_osx_aarch_64.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>${maven-antrun-plugin.version}</version>
-            <inherited>false</inherited>
-            <executions>
               <execution>
                 <id>extract-mac-library</id>
                 <goals>


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

Reply via email to