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


##########
hadoop-ozone/dist/dev-support/bin/dist-layout-stitching:
##########
@@ -143,6 +143,24 @@ for file in $(find "${ROOT}" -path 
'*/share/ozone/lib/*jar' | sort); do
   cp -p "$file" share/ozone/lib/
 done
 
+# ---------------------------------------------------------
+# Copy Hadoop Native Libraries (libhadoop.so) - Conditionally
+# ---------------------------------------------------------
+NATIVE_LIBS_DIR="${ROOT}/target/native-lib"
+
+# Check if the .so files actually exist before attempting to copy

Review Comment:
   these can be .dylib files too, right?
   ```suggestion
   # Check if the libhadoop files actually exist before attempting to copy
   ```



##########
hadoop-ozone/dist/dev-support/bin/dist-layout-stitching:
##########
@@ -143,6 +143,24 @@ for file in $(find "${ROOT}" -path 
'*/share/ozone/lib/*jar' | sort); do
   cp -p "$file" share/ozone/lib/
 done
 
+# ---------------------------------------------------------
+# Copy Hadoop Native Libraries (libhadoop.so) - Conditionally
+# ---------------------------------------------------------
+NATIVE_LIBS_DIR="${ROOT}/target/native-lib"
+
+# Check if the .so files actually exist before attempting to copy
+if ls "${NATIVE_LIBS_DIR}"/libhadoop.* 1> /dev/null 2>&1; then
+  echo "Found Hadoop native libraries. Copying to distribution..."
+
+  # Create the native directory in the final staging area
+  run mkdir -p ./lib/native
+
+  # Copy the files and symlinks safely
+  run cp -rP "${NATIVE_LIBS_DIR}/"libhadoop.* ./lib/native

Review Comment:
   will the ozone-env.sh script (or docker-config for our Docker deployments) 
need to set NATIVE_LIBS_DIR to lib/native for ozone to pick up libhadoop from 
this path?



-- 
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