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
This commit is contained in:
Eric Yang 2011-10-07 01:10:08 +00:00
parent 21cb78d246
commit 77f79ee92b
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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