首页 > 代码库 > Sqoop2常用命令介绍
Sqoop2常用命令介绍
命令行操作之Create Command
1、Create Connection Function
create connection --cid 1 说明:Create new connection object for connector with id <x>
sqoop:000> create connection --cid 1Creating connection for connector with id 1Please fill following values to create new connection objectName: jdbcConnection configurationJDBC Driver Class: com.mysql.jdbc.DriverJDBC Connection String: jdbc:mysql://hadoop000:3306/hiveUsername: rootPassword: ****JDBC Connection Properties:There are currently 0 values in the map:entry#Security related configuration optionsMax connections: 100New connection was successfully created with validation status FINE and persistent id 5
2、Create Job Function
create job --xid 1 说明:Create new job object for connection with id <x>
create job --xid 1 --type import 说明:Create new job object with type <t> (import, export)
sqoop:000> create job --xid 5 --type importCreating job for connection with id 5Please fill following values to create new job objectName: tbls_importDatabase configurationSchema name: hiveTable name: TBLSTable SQL statement:Table column names:Partition column name:Nulls in partition column:Boundary query:Output configurationStorage type: 0 : HDFSChoose: 0Output format: 0 : TEXT_FILE 1 : SEQUENCE_FILEChoose: 0Compression format: 0 : NONE 1 : DEFAULT 2 : DEFLATE 3 : GZIP 4 : BZIP2 5 : LZO 6 : LZ4 7 : SNAPPYChoose: 0Output directory: hdfs://hadoop000:8020/sqoop2/tbls/Throttling resourcesExtractors:Loaders:New job was successfully created with validation status FINE and persistent id 3
命令行操作之Show Command
1、Show Server Function
说明:Show details about configuration connection to Sqoop server.
sqoop:000> show server --allServer host: localhostServer port: 12000Server webapp: sqoopsqoop:000> show server --hostServer host: localhostsqoop:000> show server --portServer port: 12000sqoop:000> show server --webappServer webapp: sqoop
2、Show Option Function
Show values of various client side options. This function will show all client options when called without arguments.
sqoop:000> show option --name verboseVerbose = false
3、Show Version Function
Show versions of both client and server as well as supported protocols.
sqoop:000> show version --allclient version: Sqoop 1.99.3-cdh5.0.0 revision Unknown Compiled by jenkins on Thu Mar 27 23:34:50 PDT 2014server version: Sqoop 1.99.3-cdh5.0.0 revision Unknown Compiled by jenkins on Thu Mar 27 23:34:50 PDT 2014Protocol version: [1]sqoop:000> show version --clientclient version: Sqoop 1.99.3-cdh5.0.0 revision Unknown Compiled by jenkins on Thu Mar 27 23:34:50 PDT 2014sqoop:000> show version --serverserver version: Sqoop 1.99.3-cdh5.0.0 revision Unknown Compiled by jenkins on Thu Mar 27 23:34:50 PDT 2014sqoop:000> show version --protocolProtocol version: [1]
4、Show Connector Function
Show connector meta data - parameters that connectors need in order to create new connection and job objects.
show connector --all
5、Show Connection Function
show connection -allshow connection --xid 5
6、Show Job Function
show job --allshow job --jid 4
命令行操作之Update Command
1、Update Connection Function
update connection --xid 1
2、Update Job Function
update job --jid 1
命令行操作之Delete Command
1、Delete Connection Function
delete connection --xid 1
2、Delete Job Function
delete job --jid 1
命令行操作之Clone Command
1、Clone Connection Function
clone connection --xid 3
2、Clone Job Function
clone job --jid 3
命令行操作之Submission Command
1、Submission Start Function
Start job (submit new submission). Starting already running job is considered as invalid operation.
start job --jid 3 -s
2、Submission Stop Function
Interrupt running job.
stop job --jid 3
3、Submission Status Function
Retrieve last status for given job.
status job --jid 3
Sqoop2常用命令介绍
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。