批处理模式需要额外的参数,需要添加上script.sqoop的路径
[mw_shl_code=bash,true]sqoop2-shell /path/to/your/script.sqoop
[/mw_shl_code]
Sqoop client 脚本包括Sqoop client 命令,以#开头,表示注释。如下面例子
[mw_shl_code=bash,true]# Specify company server
set server --host sqoop2.company.net
# Executing given job
start job --name 1[/mw_shl_code]
exit :退出客户端。也可以使用EOT 字符。 history :可以看到以前执行的命令 help :显示所有可用的命令
[mw_shl_code=bash,true]sqoop:000> help
For information about Sqoop, visit: http://sqoop.apache.org/
Available commands:
exit (\x ) Exit the shell
history (\H ) Display, manage and recall edit-line history
help (\h ) Display this help message
set (\st ) Configure various client options and settings
show (\sh ) Display various objects and configuration options
create (\cr ) Create new object in Sqoop repository
delete (\d ) Delete existing object in Sqoop repository
update (\up ) Update objects in Sqoop repository
clone (\cl ) Create new object based on existing one
start (\sta) Start job
stop (\stp) Stop job
status (\stu) Display status of a job
enable (\en ) Enable object in Sqoop repository
disable (\di ) Disable object in Sqoop repository[/mw_shl_code]