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

iwasakims pushed a commit to branch branch-2
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/branch-2 by this push:
     new 61bd868  HDFS-14707. Add JAVA_LIBRARY_PATH to HTTPFS startup options 
in branch-2.
61bd868 is described below

commit 61bd868e80878202a8b86ccd67dce05361f63a34
Author: Masatake Iwasaki <[email protected]>
AuthorDate: Wed Aug 7 10:56:10 2019 +0900

    HDFS-14707. Add JAVA_LIBRARY_PATH to HTTPFS startup options in branch-2.
    
    Signed-off-by: Masatake Iwasaki <[email protected]>
---
 .../hadoop-hdfs-httpfs/src/main/conf/httpfs-env.sh             |  6 ++++++
 hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/sbin/httpfs.sh | 10 +++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/conf/httpfs-env.sh 
b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/conf/httpfs-env.sh
index d0b5069..47bb496 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/conf/httpfs-env.sh
+++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/conf/httpfs-env.sh
@@ -72,3 +72,9 @@
 # The password of the SSL keystore if using SSL
 #
 # export HTTPFS_SSL_KEYSTORE_PASS=password
+
+# The full path to any native libraries that need to be loaded
+# (For eg. location of natively compiled tomcat Apache portable
+# runtime (APR) libraries
+#
+# export JAVA_LIBRARY_PATH=${HOME}/lib/native
diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/sbin/httpfs.sh 
b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/sbin/httpfs.sh
index 8accc59..22164c8 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/sbin/httpfs.sh
+++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/sbin/httpfs.sh
@@ -31,7 +31,14 @@ BASEDIR=`cd ${BASEDIR}/..;pwd`
 
 HTTPFS_SILENT=${HTTPFS_SILENT:-true}
 
-source ${HADOOP_LIBEXEC_DIR:-${BASEDIR}/libexec}/httpfs-config.sh
+HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-${BASEDIR}/libexec}"
+source ${HADOOP_LIBEXEC_DIR}/httpfs-config.sh
+
+if [[ -z "${JAVA_LIBRARY_PATH}" ]]; then
+  JAVA_LIBRARY_PATH="${HADOOP_LIBEXEC_DIR}/../lib/native/"
+else
+  JAVA_LIBRARY_PATH="${HADOOP_LIBEXEC_DIR}/../lib/native/:${JAVA_LIBRARY_PATH}"
+fi
 
 # The Java System property 'httpfs.http.port' it is not used by HttpFS,
 # it is used in Tomcat's server.xml configuration file
@@ -40,6 +47,7 @@ print "Using   CATALINA_OPTS:       ${CATALINA_OPTS}"
 
 catalina_opts="-Dproc_httpfs";
 catalina_opts="${catalina_opts} -Dhttpfs.log.dir=${HTTPFS_LOG}"
+catalina_opts="${catalina_opts} -Djava.library.path=${JAVA_LIBRARY_PATH}"
 
 print "Adding to CATALINA_OPTS:     ${catalina_opts}"
 


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

Reply via email to