THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
Wiki Markup |
---|
{color:red}NOTE THAT the information mentioned on this page is still in progress and may not be fully implemented yet.{color} {toc:style=outline|maxLevel=5} h3. Building from sources Checkout sources: {noformat} $ svn co https://svn.apache.org/repos/asf/sqoop/branches/sqoop2 {noformat} Then, change to Sqoop2 source directory and build them: {noformat} $ cd sqoop2 $ mvn install {noformat} h3. Creating distribution Now build and package Sqoop2 as distribution: {noformat} $ mvn package -Pdist {noformat} 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 {noformat} --+ bin --+ sqoop | + conf --+ sqoop_bootstrap.properties | | | +- sqoop.properties | + server --+ bin --+ setenv.sh | | | + webapps --+ sqoop.war | + sqoop-client.jar | + sqoop-common.jar | + ... {noformat} As part of this process, a copy of Tomcat server is also downloaded and put under the _server_ directory in the above structure. h3. Starting/Stopping Sqoop2 server To start Sqoop2 server, change to Sqoop2 distribution directory and invoke the _sqoop_ shell script: {noformat} cd dist/target/sqoop-2.0.0-SNAPSHOT bin/sqoop server start {noformat} Similarly, to stop Sqoop2 server, do the following: {noformat} bin/sqoop server stop {noformat} h3. Starting/Running Sqoop2 shell client To start an interactive shell client, {noformat} bin/sqoop client {noformat} This will bring up an interactive client ready for input commands: {noformat} Sqoop Shell: Type 'help' or '\h' for help. sqoop:000> {noformat} Alternatively, the shell client can be run in script mode. For example, a command script can be created as {noformat} echo "set server --host localhost --port 8080 --webapp sqoop" > sqoop.script echo "show version --all" >> sqoop.script {noformat} Then, the command script can be run with {noformat} bin/sqoop client sqoop.script {noformat} 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> - show -- show version --- show version --all --- show version --server --- show version --client --- show version --protocol {hide-if:type=page} -- 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> {hide-if} |