本文主要是介绍Sqoop安装及测试,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1.${SQOOP_HOME}/conf/
$ cp sqoop-env-template.sh sqoop-env.sh //拷贝模板生成配置环境目录
=============修改sqoop-env.sh 配置文件
#Set path to where bin/hadoop is available
export HADOOP_COMMON_HOME=/opt/modules/cdh/hadoop-2.5.0-cdh5.3.6
#Set path to where hadoop-*-core.jar is available
export HADOOP_MAPRED_HOME=/opt/modules/cdh/hadoop-2.5.0-cdh5.3.6
#set the path to where bin/hbase is available
#export HBASE_HOME=
#Set the path to where bin/hive is available
export HIVE_HOME=/opt/modules/cdh/hive-0.13.1-cdh5.3.6
#Set the path for where zookeper config dir is
export ZOOCFGDIR=/opt/modules/cdh/zookeeper-3.4.5-cdh5.3.6/conf
==========================
2.拷贝mysql的jdbc驱动包到${SQOOP_HOME}/lib
$ cp mysql-connector-java-5.1.34-bin.jar /opt/modules/cdh/sqoop-1.4.5-cdh5.3.6/lib/
##测试连接--MySQL
bin/sqoop list-databases \
--connect jdbc:mysql://linux1:3306 \
--username root \
--password 123456
Preparing to use a MySQL streaming resultset.
information_schema
cdhmetastore
metastore
mysql
test
这篇关于Sqoop安装及测试的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!