sqoop安装

1.项目环境

       项目用到的hadoop的版本是1.2.1,所以对应的sqoop是sqoop-1.4.4.bin__hadoop-1.0.0,mysql的jdbc是mysql-connector-java-5.1.24

2.安装

     1).解压sqoop,配置环境变量:在/etc/profile中添加:   

export $SQOOP_HOME=/home/hadoop/sqoop-1.4.3
export $PATH = $SQOOP_HOME/bin:$PATH
   2). 执行    source /etc/profile

3. 复制集群中hadoop的core包以及mysql-jdbc包到sqoop-lib目录下。

4. 配置home路径,conf/sqoop-env.sh下

#Set path to where bin/hadoop is available
export HADOOP_COMMON_HOME=/home/hadoop/hadoop-1.2.1

#Set path to where hadoop-*-core.jar is available
export HADOOP_MAPRED_HOME=/home/hadoop/hadoop-1.2.1

#set the path to where bin/hbase is available
export HBASE_HOME=/home/hadoop/hbase-0.94.11

#Set the path to where bin/hive is available
export HIVE_HOME=/home/hadoop/hive-0.11.0
5. 将hive下的为libthrift-0.9.0.jar拷贝到Hbase的lib下,将lib下的0.8.0版的删除,换为0.9.0的即可。否则
Sqoop向Hive中导入数据报错


©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页