什么是sqoop:
Apache Sqoop
Apache Sqoop™ is a tool designed for efficiently transferring bulk data between Apache Hadoop and structured datastores such as relational databases.
Sqoop successfully graduated from the Incubator in March of 2012 and is now a Top-Level Apache project: More information
Latest stable release is 1.4.7 (download, documentation). Latest cut of Sqoop2 is 1.99.7 (download, documentation). Note that 1.99.7 is not compatible with 1.4.7 and not feature complete, it is not intended for production deployment.
开始安装:
1)下载 cdh
2)解压到~/app下
3)SQOOP_HOME
export SQOOP_HOME=/home/hadoop/app/sqoop-1.4.6-cdh5.7.0
export PATH=$SQOOP_HOME/bin:$PATH
4)conf: $SQOOP_HOME/conf/sqoop-env.sh
export HADOOP_COMMON_HOME=/home/hadoop/app/hadoop
export HADOOP_MAPRED_HOME=/home/hadoop/app/hadoop
export HIVE_HOME=/home/hadoop/app/hive-1.1.0-cdh5.7.0
拷贝mysql驱动:
cp ~/app/mysql-connector-java-5.1.30.jar $SQOOP_HOME/lib
后面还需要 json.jar