HDFS-12166. Do not deprecate HTTPFS_TEMP. Contributed by John Zhuge.

Change-Id: Icdd032de9feea3d0dde71bf8145b70497993d97f
This commit is contained in:
John Zhuge 2017-07-19 17:37:33 -07:00 committed by John Zhuge
parent 44350fdf49
commit 3b48f81411
4 changed files with 11 additions and 10 deletions

View File

@ -28,7 +28,7 @@
# HTTPFS temporary directory # HTTPFS temporary directory
# #
# export HTTPFS_TEMP=${HADOOP_HOME}/temp # export HTTPFS_TEMP=${HADOOP_HDFS_HOME}/temp
# The HTTP port used by HTTPFS # The HTTP port used by HTTPFS
# #

View File

@ -71,8 +71,6 @@ public class HttpFSServerWebServer {
HttpFSServerWebServer(Configuration conf, Configuration sslConf) throws HttpFSServerWebServer(Configuration conf, Configuration sslConf) throws
Exception { Exception {
// Override configuration with deprecated environment variables. // 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, deprecateEnv("HTTPFS_HTTP_HOSTNAME", conf, HTTP_HOSTNAME_KEY,
HTTPFS_SITE_XML); HTTPFS_SITE_XML);
deprecateEnv("HTTPFS_HTTP_PORT", conf, HTTP_PORT_KEY, deprecateEnv("HTTPFS_HTTP_PORT", conf, HTTP_PORT_KEY,

View File

@ -37,14 +37,18 @@ function hdfs_subcommand_httpfs
# shellcheck disable=SC2034 # shellcheck disable=SC2034
hadoop_add_param HADOOP_OPTS "-Dhttpfs.home.dir" \ 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" \ hadoop_add_param HADOOP_OPTS "-Dhttpfs.config.dir" \
"-Dhttpfs.config.dir=${HTTPFS_CONFIG:-${HADOOP_CONF_DIR}}" "-Dhttpfs.config.dir=${HTTPFS_CONFIG:-${HADOOP_CONF_DIR}}"
hadoop_add_param HADOOP_OPTS "-Dhttpfs.log.dir" \ hadoop_add_param HADOOP_OPTS "-Dhttpfs.log.dir" \
"-Dhttpfs.log.dir=${HTTPFS_LOG:-${HADOOP_LOG_DIR}}" "-Dhttpfs.log.dir=${HTTPFS_LOG:-${HADOOP_LOG_DIR}}"
if [[ "${HADOOP_DAEMON_MODE}" == "default" ]] || local temp_dir=${HTTPFS_TEMP:-${HADOOP_HDFS_HOME}/temp}
[[ "${HADOOP_DAEMON_MODE}" == "start" ]]; then hadoop_add_param HADOOP_OPTS "-Dhttpfs.temp.dir" \
hadoop_mkdir "${HTTPFS_TEMP:-${HADOOP_HOME}/temp}" "-Dhttpfs.temp.dir=${temp_dir}"
fi case ${HADOOP_DAEMON_MODE} in
start|default)
hadoop_mkdir "${temp_dir}"
;;
esac
} }

View File

@ -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_ENABLED | httpfs.ssl.enabled | httpfs-site.xml
HTTPFS_SSL_KEYSTORE_FILE | ssl.server.keystore.location | ssl-server.xml HTTPFS_SSL_KEYSTORE_FILE | ssl.server.keystore.location | ssl-server.xml
HTTPFS_SSL_KEYSTORE_PASS | ssl.server.keystore.password | 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 HTTP Default Services
--------------------- ---------------------