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


##########
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:
   ./lib/native doesn't always exists. But yes, I think ozone-env.sh or 
ozone.sh can auto add lib/native to java library path if it exists. 



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