NOTE THAT the information mentioned on this page is still in progress and may not be fully implemented yet.
Building from sources
Checkout sources:
$ svn co https://svn.apache.org/repos/asf/sqoop/branches/sqoop2
Then, change to Sqoop2 directory and build them:
$ cd sqoop2 $ mvn install
Creating distribution
Now build and package Sqoop2 as distribution:
$ mvn package -Pdist
This process will create a directory and a tarball under dist/target directory. The directory (named sqoop-2.0.0-SNAPSHOT as of this writing) contains necessary binaries to run Sqoop2, and its structure looks something like
--+ bin --+ sqoop | + conf --+ sqoop_bootstrap.properties | | | +- sqoop.properties | + server --+ bin --+ setenv.sh | | | + webapps --+ sqoop.war | + sqoop-client.jar | + sqoop-common.jar | + ...
As part of this process, a copy of Tomcat server is also downloaded and put under the server directory in the above structure.
Starting/Stopping Sqoop2 server
To start Sqoop2 server, change to Sqoop2 distribution directory and invoke the sqoop shell script:
cd dist/target/sqoop-2.0.0-SNAPSHOT bin/sqoop server start
Similarly, to stop Sqoop2 server, do the following:
bin/sqoop server stop
Starting/Running Sqoop2 shell client
To start an interactive shell client,
bin/sqoop client
Alternatively, the shell client can be run in script mode. For example, a command script can be created as
echo "set server --host localhost --port 8080 --webapp sqoop" > sqoop.script echo "show version --all" >> sqoop.script
Then, the command script can be run with
bin/sqoop client sqoop.script
The command for the shell client looks something like <command> <function> <options>:
- set
- set server
- set server --host <host>
- set server --port <port>
- set server --webapp <webapp>
- set server
- show
- show version
- show version --all
- show version --server
- show version --client
- show version --protocol
Unknown macro: {hide-if}
– show connector
– show connection
– show job- create
- create connection --id <connector id> <more connection options>
- create job --cid <connection id> <more job options>
- start
- start job --jid <job id>
- stop
- stop job --jid <job id>
- create
- show version