Question

I have Hadoop(pseudo distributed mode), Hive, sqoop and mysql installed in my local machine.

But when I am trying to run sqoop Its giving me the following error

Error: /usr/lib/hadoop does not exist!
Please set $HADOOP_COMMON_HOME to the root of your Hadoop installation.

Then I set the sqoop-env-template.sh file with all the information. Beneath is the snapshot of the sqoop-env-template.sh file.

enter image description here

Even after providing the hadoop hive path I face the same error.

I've installed hadoop in /home/hduser/hadoop version 1.0.3

hive in /home/hduser/hive version 0.11.0

sqoop in /home/hduser/sqoop version 1.4.4

and mysql connector jar java-5.1.29

Could anybody please throw some light on what is going wrong

Was it helpful?

Solution

sqoop-env-template.sh is a template, meaning it doesn't by itself get sourced by the configurator. If you want it to have a custom conf and load it, make a copy as $SQOOP_HOME/conf/sqoop-env.sh.

Note: here is the relevant excerpt from bin/configure-sqoop for version 1.4.4:

SQOOP_CONF_DIR=${SQOOP_CONF_DIR:-${SQOOP_HOME}/conf}

if [ -f "${SQOOP_CONF_DIR}/sqoop-env.sh" ]; then
  . "${SQOOP_CONF_DIR}/sqoop-env.sh"
fi
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top