标签:用户 文件目录 size load resource cat ext jps sqoop2
http://www-us.apache.org/dist/sqoop/
打开以上链接,开始下载sqoop2
下载后得到:sqoop-1.99.7-bin-hadoop200.tar.gz文件
其中sqoop1和sqoop2区别可以参考以下链接
重拾初心——Sqoop1和Sqoop2的刨析对比
http://blog.csdn.net/gamer_gyt/article/details/55225700
安装步骤参考官方文档
http://sqoop.apache.org/docs/1.99.7/admin/Installation.html
将sqoop-1.99.7-bin-hadoop200.tar.gz上传至服务器中,这里安装到/usr/local/hadoop/sqoop-1.99.7目录中
# 拷贝tar包到/usr/local/hadoop/中
cp sqoop-1.99.7-bin-hadoop200.tar.gz /usr/local/hadoop/
# 解压tar包
tar -xvf sqoop-1.99.7-bin-hadoop200.tar.gz
# 为文件夹重命名
mv sqoop-1.99.7-bin-hadoop200 sqoop-1.99.7
export HADOOP_HOME=/..
或者
export HADOOP_COMMON_HOME=/...
export HADOOP_HDFS_HOME=/...
export HADOOP_MAPRED_HOME=/...
export HADOOP_YARN_HOME=/...
如果配置了HADOOP_HOME,则sqoop会自动寻找$HADOOP_HOME/share/common相应的目录。
#Sqoop配置
export SQOOP2_HOME=/usr/local/hadoop/sqoop-1.99.7
export CATALINA_BASE=$SQOOP2_HOME/server
#Sqoop外部jar包存放路径,以后mysql-**.jar,odbc*.jar文件都放到extra-lib中即可
export SQOOP_SERVER_EXTRA_LIB=$SQOOP2_HOME/server/lib/extra-lib
export PATH=$PATH:$SQOOP2_HOME/bin
<property>
<name>hadoop.proxyuser.sqoop2.hosts</name>
<value>*</value>
</property>
<property>
<name>hadoop.proxyuser.sqoop2.groups</name>
<value>*</value>
</property>
org.apache.sqoop.submission.engine.mapreduce.configuration.directory=/usr/local/hadoop/hadoop-2.7.4/etc/hadoop
因为sqoop2中存储着元数据信息,所以首次安装时需要初始化仓库
sqoop2-tool upgrade
初始化完成后,可以做一次验证
sqoop2-tool verify
当出现Verification was successful.字样时,表示初始化成功。
执行sqoop2-server start启动sqoop,同理。执行sqoop2-server stop会停止sqoop
sqoop2-server start
执行完以上命令后,启动信息如下。
然后执行jps命令查看启动了哪些进程,可以看到sqoop server只启动了SqoopJettyServer进程。
由于我现在是伪分布式,所以sqoop server和sqoop client都在一台机器上,直接执行sqoop2-shell命令即可启动sqoop客户端
可以查看sqoop2的版本,执行show version --all命令
sqoop:000> show version --all
client version:
Sqoop1.99.7 source revision 435d5e61b922a32d7bce567fe5fb1a9c0d9b1bbb
Compiledby abefine on TueJul1916:08:27 PDT 2016
0[main] WARN org.apache.hadoop.util.NativeCodeLoader-Unable to load native-hadoop library for your platform...using builtin-java classes where applicable
server version:
Sqoop1.99.7 source revision 435d5e61b922a32d7bce567fe5fb1a9c0d9b1bbb
Compiledby abefine on TueJul1916:08:27 PDT 2016
API versions:
[v1]
sqoop:000>
标签:用户 文件目录 size load resource cat ext jps sqoop2
原文地址:http://www.cnblogs.com/meet/p/7682855.html