From 77f79ee92b7271df7946fb20a26fb2da3710a0c8 Mon Sep 17 00:00:00 2001 From: Eric Yang Date: Fri, 7 Oct 2011 01:10:08 +0000 Subject: [PATCH] HADOOP-7724. Fixed hadoop-setup-conf.sh to put proxy user in core-site.xml. (Arpit Gupta via Eric Yang) git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1179915 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../hadoop-common/src/main/packages/hadoop-setup-conf.sh | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index b8afc6b7ce2..dcefcc47461 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -688,6 +688,9 @@ Release 0.23.0 - Unreleased HADOOP-7708. Fixed hadoop-setup-conf.sh to handle config files consistently. (Eric Yang) + HADOOP-7724. Fixed hadoop-setup-conf.sh to put proxy user in + core-site.xml. (Arpit Gupta via Eric Yang) + Release 0.22.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/hadoop-common-project/hadoop-common/src/main/packages/hadoop-setup-conf.sh b/hadoop-common-project/hadoop-common/src/main/packages/hadoop-setup-conf.sh index 8d54b2e41df..2bf2742ca9f 100644 --- a/hadoop-common-project/hadoop-common/src/main/packages/hadoop-setup-conf.sh +++ b/hadoop-common-project/hadoop-common/src/main/packages/hadoop-setup-conf.sh @@ -139,6 +139,7 @@ function addPropertyToXMLConf ######################################### function setupProxyUsers { + local conf_file="${HADOOP_CONF_DIR}/core-site.xml" #if hadoop proxy users are sent, setup hadoop proxy if [ ! -z $HADOOP_PROXY_USERS ] then @@ -156,10 +157,10 @@ function setupProxyUsers #determine the property names and values proxy_groups_property="hadoop.proxyuser.${user}.groups" proxy_groups_val="$groups" - addPropertyToXMLConf "${HADOOP_CONF_DIR}/hdfs-site.xml" "$proxy_groups_property" "$proxy_groups_val" + addPropertyToXMLConf "$conf_file" "$proxy_groups_property" "$proxy_groups_val" proxy_hosts_property="hadoop.proxyuser.${user}.hosts" proxy_hosts_val="$hosts" - addPropertyToXMLConf "${HADOOP_CONF_DIR}/hdfs-site.xml" "$proxy_hosts_property" "$proxy_hosts_val" + addPropertyToXMLConf "$conf_file" "$proxy_hosts_property" "$proxy_hosts_val" IFS=';' done IFS=$oldIFS