命令行操作之Create Command
1、Create Connection Function
create connection --cid 1 说明:Create new connection object for connector with id <x>
sqoop:> create connection --cid
Creating connection for connector with id
Please fill following values to create new connection object
Name: jdbc
Connection configuration
JDBC Driver Class: com.mysql.jdbc.Driver
JDBC Connection String: jdbc:mysql://hadoop000:3306/hive
Username: root
Password: ****
JDBC Connection Properties:
There are currently values in the map:
entry#
Security related configuration options
Max connections:
New connection was successfully created with validation status FINE and persistent id
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:> create job --xid --type import
Creating job for connection with id
Please fill following values to create new job object
Name: tbls_import
Database configuration
Schema name: hive
Table name: TBLS
Table SQL statement:
Table column names:
Partition column name:
Nulls in partition column:
Boundary query:
Output configuration
Storage type:
: HDFS
Choose:
Output format:
: TEXT_FILE
: SEQUENCE_FILE
Choose:
Compression format:
: NONE
: DEFAULT
: DEFLATE
: GZIP
: BZIP2
: LZO
: LZ4
: SNAPPY
Choose:
Output directory: hdfs://hadoop000:8020/sqoop2/tbls/
Throttling resources
Extractors:
Loaders:
New job was successfully created with validation status FINE and persistent id
命令行操作之Show Command
1、Show Server Function
说明:Show details about configuration connection to Sqoop server.
sqoop:> show server --all
Server host: localhost
Server port:
Server webapp: sqoop
sqoop:> show server --host
Server host: localhost
sqoop:> show server --port
Server port:
sqoop:> show server --webapp
Server 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:> show option --name verbose
Verbose = false
3、Show Version Function
Show versions of both client and server as well as supported protocols.
sqoop:> show version --all
client version:
Sqoop 1.99.-cdh5.0.0 revision Unknown
Compiled by jenkins on Thu Mar :: PDT
server version:
Sqoop 1.99.-cdh5.0.0 revision Unknown
Compiled by jenkins on Thu Mar :: PDT
Protocol version:
[]
sqoop:> show version --client
client version:
Sqoop 1.99.-cdh5.0.0 revision Unknown
Compiled by jenkins on Thu Mar :: PDT
sqoop:> show version --server
server version:
Sqoop 1.99.-cdh5.0.0 revision Unknown
Compiled by jenkins on Thu Mar :: PDT
sqoop:> show version --protocol
Protocol version:
[]
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 -all
show connection --xid
6、Show Job Function
show job --all
show job --jid
命令行操作之Update Command
1、Update Connection Function
update connection --xid
2、Update Job Function
update job --jid
命令行操作之Delete Command
1、Delete Connection Function
delete connection --xid
2、Delete Job Function
delete job --jid
命令行操作之Clone Command
1、Clone Connection Function
clone connection --xid
2、Clone Job Function
clone job --jid
命令行操作之Submission Command
1、Submission Start Function
Start job (submit new submission). Starting already running job is considered as invalid operation.
start job --jid -s
2、Submission Stop Function
Interrupt running job.
stop job --jid
3、Submission Status Function
Retrieve last status for given job.
status job --jid