Browse Source

HDFS-3057. httpfs and hdfs launcher scripts should honor CATALINA_HOME and HADOOP_LIBEXEC_DIR (rvs via tucu)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1300637 13f79535-47bb-0310-9956-ffa450edef68
Alejandro Abdelnur 13 năm trước cách đây
mục cha
commit
a0ee9adfd3

+ 7 - 0
hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/libexec/httpfs-config.sh

@@ -150,6 +150,13 @@ else
   print "Using   CATALINA_BASE:       ${CATALINA_BASE}"
 fi
 
+if [ "${HTTPFS_CATALINA_HOME}" = "" ]; then
+  export HTTPFS_CATALINA_HOME=${CATALINA_BASE}
+  print "Setting HTTPFS_CATALINA_HOME:       ${HTTPFS_CATALINA_HOME}"
+else
+  print "Using   HTTPFS_CATALINA_HOME:       ${HTTPFS_CATALINA_HOME}"
+fi
+
 if [ "${CATALINA_OUT}" = "" ]; then
   export CATALINA_OUT=${HTTPFS_LOG}/httpfs-catalina.out
   print "Setting CATALINA_OUT:        ${CATALINA_OUT}"

+ 3 - 3
hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/sbin/httpfs.sh

@@ -29,7 +29,7 @@ done
 BASEDIR=`dirname ${PRG}`
 BASEDIR=`cd ${BASEDIR}/..;pwd`
 
-source ${BASEDIR}/libexec/httpfs-config.sh
+source ${HADOOP_LIBEXEC_DIR:-${BASEDIR}/libexec}/httpfs-config.sh
 
 # The Java System property 'httpfs.http.port' it is not used by HttpFS,
 # it is used in Tomcat's server.xml configuration file
@@ -55,8 +55,8 @@ if [ "${1}" = "stop" ]; then
 fi
 
 if [ "${HTTPFS_SILENT}" != "true" ]; then
-  ${CATALINA_BASE:-"${BASEDIR}/share/hadoop/httpfs/tomcat"}/bin/catalina.sh "$@"
+  ${HTTPFS_CATALINA_HOME}/bin/catalina.sh "$@"
 else
-  ${CATALINA_BASE:-"${BASEDIR}/share/hadoop/httpfs/tomcat"}/bin/catalina.sh "$@" > /dev/null
+  ${HTTPFS_CATALINA_HOME}/bin/catalina.sh "$@" > /dev/null
 fi
 

+ 3 - 0
hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt

@@ -228,6 +228,9 @@ Release 0.23.3 - UNRELEASED
     HDFS-3082. Clean up FSDatasetInterface and change DataNode.data to package
     private.  (szetszwo)
 
+    HDFS-3057. httpfs and hdfs launcher scripts should honor CATALINA_HOME 
+    and HADOOP_LIBEXEC_DIR (rvs via tucu)
+
   OPTIMIZATIONS
 
     HDFS-3024. Improve performance of stringification in addStoredBlock (todd)