sqoop2的相关配置,启动,停止命令(转)

时间:2022-04-10 20:13:40

原博客地址:http://blog.csdn.net/u012772782/article/details/52949181

sqoop2配置:

一、添加sqoop2到系统环境变量中:

export SQOOP2_HOME=/opt/application/sqoop/sqoop-1.99.7/    
export CATALINA_BASE=$SQOOP2_HOME/server  
export PATH=.:$SQOOP2_HOME/bin:$PATH 

二、驱动jar包目录:

$SQOOP2_HOME/server/lib 

三、配置文件目录:  

$SQOOP2_HOME/conf/sqoop.properties</span>  
org.apache.sqoop.submission.engine.mapreduce.configuration.directory=/opt/application/hadoop/hadoop-2.6.4/etc/hadoop  
org.apache.sqoop.security.authentication.type=SIMPLE  
org.apache.sqoop.security.authentication.handler=org.apache.sqoop.security.authentication.SimpleAuthenticationHandler  
org.apache.sqoop.security.authentication.anonymous=true  
# Number of milliseconds, submissions created before this limit will be removed, default is one day     //锁定提交的job时间,锁定时间内不能删除  
org.apache.sqoop.submission.purge.threshold=300000  
# JDBC repository provider configuration    //jdbc配置目录  
org.apache.sqoop.repository.jdbc.url=jdbc:derby:/opt/application/sqoop/sqoop-1.99.7/logs/repository/db;create=true  
org.apache.sqoop.log4j.appender.file.File=/opt/application/sqoop/sqoop-1.99.7/logs/sqoop.log                         //sqoop2日志文件目录  
org.apache.sqoop.repository.sysprop.derby.stream.error.file=/opt/application/sqoop/sqoop-1.99.7/logs/derbyrepo.log   //错误日志文件目录  

四、启停sqoop-server:

$SQOOP2_HOME/bin/sqoop.sh server start  
$SQOOP2_HOME/bin/sqoop.sh server stop  
或者  
$SQOOP2_HOME/bin/sqoop2-server start  
$SQOOP2_HOME/bin/sqoop2-server stop 

五、验证sqoop2是否启动成功:

方式一:jps查看进程: Bootstrap  
方式二:http://hadoop_IP:12000/sqoop/version  
方式三:wget -qO - hadoop_IP:12000/sqoop/version 

六、启动sqoop客户端:

$SQOOP2_HOME/bin/sqoop.sh client 
或者
$SQOOP2_HOME/bin/sqoop2-shell 

七、为客户端配置服务器:

sqoop:000> set server --host hadoop000 --port 12000 --webapp sqoop 

 八、查看服务器端信息:

sqoop:000> show server --all