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 6c0a80fea9a..5b7b05d3ba2 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 @@ -28,7 +28,7 @@ # HTTPFS temporary directory # -# export HTTPFS_TEMP=${HADOOP_HOME}/temp +# export HTTPFS_TEMP=${HADOOP_HDFS_HOME}/temp # The HTTP port used by HTTPFS # diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSServerWebServer.java b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSServerWebServer.java index 0949f868350..39f1caf0b20 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSServerWebServer.java +++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSServerWebServer.java @@ -71,8 +71,6 @@ public class HttpFSServerWebServer { HttpFSServerWebServer(Configuration conf, Configuration sslConf) throws Exception { // Override configuration with deprecated environment variables. - deprecateEnv("HTTPFS_TEMP", conf, HttpServer2.HTTP_TEMP_DIR_KEY, - HTTPFS_SITE_XML); deprecateEnv("HTTPFS_HTTP_HOSTNAME", conf, HTTP_HOSTNAME_KEY, HTTPFS_SITE_XML); deprecateEnv("HTTPFS_HTTP_PORT", conf, HTTP_PORT_KEY, diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/libexec/shellprofile.d/hadoop-httpfs.sh b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/libexec/shellprofile.d/hadoop-httpfs.sh old mode 100644 new mode 100755 index 239409cbf7f..6301e274866 --- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/libexec/shellprofile.d/hadoop-httpfs.sh +++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/libexec/shellprofile.d/hadoop-httpfs.sh @@ -37,14 +37,18 @@ function hdfs_subcommand_httpfs # shellcheck disable=SC2034 hadoop_add_param HADOOP_OPTS "-Dhttpfs.home.dir" \ - "-Dhttpfs.home.dir=${HADOOP_HOME}" + "-Dhttpfs.home.dir=${HTTPFS_HOME:-${HADOOP_HDFS_HOME}}" hadoop_add_param HADOOP_OPTS "-Dhttpfs.config.dir" \ "-Dhttpfs.config.dir=${HTTPFS_CONFIG:-${HADOOP_CONF_DIR}}" hadoop_add_param HADOOP_OPTS "-Dhttpfs.log.dir" \ "-Dhttpfs.log.dir=${HTTPFS_LOG:-${HADOOP_LOG_DIR}}" - if [[ "${HADOOP_DAEMON_MODE}" == "default" ]] || - [[ "${HADOOP_DAEMON_MODE}" == "start" ]]; then - hadoop_mkdir "${HTTPFS_TEMP:-${HADOOP_HOME}/temp}" - fi -} \ No newline at end of file + local temp_dir=${HTTPFS_TEMP:-${HADOOP_HDFS_HOME}/temp} + hadoop_add_param HADOOP_OPTS "-Dhttpfs.temp.dir" \ + "-Dhttpfs.temp.dir=${temp_dir}" + case ${HADOOP_DAEMON_MODE} in + start|default) + hadoop_mkdir "${temp_dir}" + ;; + esac +} diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/site/markdown/ServerSetup.md.vm b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/site/markdown/ServerSetup.md.vm index 91ef90e4197..072c067b5d8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/site/markdown/ServerSetup.md.vm +++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/site/markdown/ServerSetup.md.vm @@ -149,7 +149,6 @@ HTTPFS_MAX_THREADS | hadoop.http.max.threads | httpfs-site.xml HTTPFS_SSL_ENABLED | httpfs.ssl.enabled | httpfs-site.xml HTTPFS_SSL_KEYSTORE_FILE | ssl.server.keystore.location | ssl-server.xml HTTPFS_SSL_KEYSTORE_PASS | ssl.server.keystore.password | ssl-server.xml -HTTPFS_TEMP | hadoop.http.temp.dir | httpfs-site.xml HTTP Default Services ---------------------