sqoop-1.99.3安装

下载http://mirror.bit.edu.cn/apache/sqoop/1.99.3/sqoop-1.99.3-bin-hadoop200.tar.gz

wget http://mirror.bit.edu.cn/apache/sqoop/1.99.3/sqoop-1.99.3-bin-hadoop200.tar.gz

环境介绍

hadoop-2.2.0.tar.gz (hadoop版本)

sqoop-1.99.3-bin-hadoop200.tar.gz (sqoop版本)

hadoop安装目录:/opt/hadoop-2.2.0

sqoop安装目录:/opt/sqoop-1.99.3

详细配置

修改/opt/sqoop-1.99.3/server/conf/sqoop.properties文件

修改org.apache.sqoop.submission.engine.mapreduce.configuration.directory值为hadoop的配置文件路径

org.apache.sqoop.submission.engine.mapreduce.configuration.directory=/opt/hadoop-2.2.0/etc/hadoop

修改/opt/sqoop-1.99.3/server/conf/catalina.properties文件修改common.loader

common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/../lib/*.jar,/opt/hadoop-2.2.0/share/hadoop/common/*.jar,/opt/hadoop-2.2.0/share/hadoop/common/lib/*.jar,/opt/hadoop-2.2.0/share/hadoop/hdfs/*.jar,/opt/hadoop-2.2.0/share/hadoop/hdfs/lib/*.jar,/opt/hadoop-2.2.0/share/hadoop/mapreduce/*.jar,/opt/hadoop-2.2.0/share/hadoop/mapreduce/lib/*.jar,/opt/hadoop-2.2.0/share/hadoop/tools/lib/*.jar,/opt/hadoop-2.2.0/share/hadoop/yarn/*.jar,/opt/hadoop-2.2.0/share/hadoop/yarn/lib/*.jar

启动server

bin/sqoop.sh server start

进入client

bin/sqoop.sh client

查看帮助

具体参考http://sqoop.apache.org/docs/1.99.3/CommandLineClient.html

注:

在hadoop-2.2.0/etc/hadoop/mapred-site.xml中添加如下配置

<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
<final>true</final>
</property>
<property>
<name>mapreduce.jobhistory.address</name>
<value>master:10020</value>
</property>
<property>
<name>mapreduce.jobhistory.webapp.address</name>
<value>master:19888</value>
</property>

启动historyserver

mr-jobhistory-daemon.sh start historyserver