一、环境
安装
tar zxf sqoop-1.4.6.bin__hadoop-2.0.4-alpha.tar.gz -C /home/hadoop/src/
chown hadoop.hadoop /home/hadoop -R
cd /home/hadoop/src/
ln -s sqoop-1.4.6.bin__hadoop-2.0.4-alpha sqoop
cd src/sqoop/conf && cp sqoop-env-template.sh sqoop-env.sh
vim sqoop-env.sh
-------------------------------------------------------
export HADOOP_COMMON_HOME=/home/hadoop/src/hadoop-2.7.2/
export HADOOP_MAPRED_HOME=/home/hadoop/src/hadoop-2.7.2/
export HBASE_HOME=/home/hadoop/src/hbase-1.2.2
export HIVE_HOME=/home/hadoop/src/apache-hive-1.2.1-bin
export HCAT_HOME=/home/hadoop/src/apache-hive-1.2.1-bin
export ZOOCFGDIR=/home/hadoop/src/zookeeper-3.4.8
export ZOOKEEPER_HOME=/home/hadoop/src/zookeeper-3.4.8/
export ZOOKEEPER_HOME=/home/hadoop/src/zookeeper-3.4.8/
--------------------------------------------------------
测试sqoop
[hadoop@master bin]$ ./sqoop version
16/09/09 12:10:53 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6
Sqoop 1.4.6
git commit id c0c5a81723759fa575844a0a1eae8f510fa32c25
Compiled by root on Mon Apr 27 14:38:36 CST 2015
Warning: /home/hadoop/src/sqoop-1.4.6.bin__hadoop-2.0.4-alpha/bin/../../accumulo does not exist! Accumulo imports will fail.
#if [ ! -d "${ACCUMULO_HOME}" ]; then
# echo "Warning: $ACCUMULO_HOME does not exist! Accumulo imports will fail."
# echo 'Please set $ACCUMULO_HOME to the root of your Accumulo installation.'
#fi