类似产品:datax,详细介绍和使用下章讲解
1、上传gz包 并解压
tar -zxvf sqoop-1.4.6.bin__hadoop-2.0.4-alpha.tar.gz
mv sqoop-1.4.6.bin__hadoop-2.0.4-alpha sqoop-1.4.6
2、配置sqoop环境变量
vim /etc/profile
source /etc/profile
3、修改配置文件
mv sqoop-env-template.sh sqoop-env.sh
export HADOOP_COMMON_HOME=/usr/local/soft/hadoop-2.6.0
export HADOOP_MAPRED_HOME=/usr/local/soft/hadoop-2.6.0
export HBASE_HOME=/usr/local/soft/hbase-0.98
export HIVE_HOME=/usr/local/soft/hive-1.2.1
export ZOOCFGDIR=/usr/local/soft/zookeeper-3.4.6/conf
export ZOOKEEPER_HOME=/usr/local/soft/zookeeper-3.4.6
4、去除警告信息,注释启动命令configure-sqoop
vim configure-sqoop
# 注释如下命令
#if [ ! -d "${HCAT_HOME}" ]; then
# echo "Warning: $HCAT_HOME does not exist! HCatalog jobs will fail."
# echo 'Please set $HCAT_HOME to the root of your HCatalog installation.'
#fi
#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
5、添加mysql驱动
mv mysql-connector-java-5.1.48.jar $SQOOP_HOME/lib/
6、测试sqoop
sqoop version
sqoop list-databases --connect jdbc:mysql://node1:3306/ --username root --password 123456
文章评论