Hi
I tried installing the hadoop rpm 1.x and the scripts provided dont work
well if the env variable HADOOP_CONF_DIR is not set properly.... I tried in
Centos

in the init scripts i found

source /etc/default/hadoop-env.sh whereas the env file is at
/etc/hadoop/hadoop-env.sh

I changed as follows and it worked

< source /etc/default/hadoop-env.sh
---
> source /etc/hadoop/hadoop-env.sh

Also in the /usr/libexec/hadoop-config.sh file

The env file is not correctly identified if the HADOOP_CONF_DIR env
variable is not set
Changing the code as follows fixed that issue...

# Allow alternate conf dir location.
if [ -e "${HADOOP_PREFIX}/conf/hadoop-env.sh" ]; then
  DEFAULT_CONF_DIR=${HADOOP_PREFIX}/"conf"
else
  DEFAULT_CONF_DIR="/etc/hadoop"
fi
HADOOP_CONF_DIR="${HADOOP_CONF_DIR:-$DEFAULT_CONF_DIR}"

if [ -f "${HADOOP_CONF_DIR}/hadoop-env.sh" ]; then
  . "${HADOOP_CONF_DIR}/hadoop-env.sh"
fi



Can this changes be done in the rpm provided in the official site? or am i
missing something

Reply via email to