You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by iw...@apache.org on 2019/08/15 02:29:32 UTC

[hadoop] branch branch-2 updated: HDFS-14707. Add JAVA_LIBRARY_PATH to HTTPFS startup options in branch-2.

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 <iw...@apache.org>
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 <iw...@apache.org>
---
 .../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: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org