com.cloudera.sqoop
Class Sqoop

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by com.cloudera.sqoop.Sqoop
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

public class Sqoop
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool

Main entry-point for Sqoop Usage: hadoop jar (this_jar_name) com.cloudera.sqoop.Sqoop (options) See the SqoopOptions class for options.


Field Summary
static org.apache.commons.logging.Log LOG
           
static java.lang.String SQOOP_RETHROW_PROPERTY
          If this System property is set, always throw an exception, do not just exit with status 1.
 
Constructor Summary
Sqoop(SqoopTool tool)
          Creates a new instance of Sqoop set to run the supplied SqoopTool with the default configuration.
Sqoop(SqoopTool tool, org.apache.hadoop.conf.Configuration conf)
          Creates a new instance of Sqoop set to run the supplied SqoopTool with the provided configuration.
Sqoop(SqoopTool tool, org.apache.hadoop.conf.Configuration conf, SqoopOptions opts)
          Creates a new instance of Sqoop set to run the supplied SqoopTool with the provided configuration and SqoopOptions.
 
Method Summary
 SqoopOptions getOptions()
           
 SqoopTool getTool()
           
static void main(java.lang.String[] args)
           
 int run(java.lang.String[] args)
           
static int runSqoop(Sqoop sqoop, java.lang.String[] args)
          Given a Sqoop object and a set of arguments to deliver to its embedded SqoopTool, run the tool, wrapping the call to ToolRunner.
static int runTool(java.lang.String[] args)
          Entry-point that parses the correct SqoopTool to use from the args, but does not call System.exit() as main() will.
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG

SQOOP_RETHROW_PROPERTY

public static final java.lang.String SQOOP_RETHROW_PROPERTY
If this System property is set, always throw an exception, do not just exit with status 1.

See Also:
Constant Field Values
Constructor Detail

Sqoop

public Sqoop(SqoopTool tool)
Creates a new instance of Sqoop set to run the supplied SqoopTool with the default configuration.

Parameters:
tool - the SqoopTool to run in the main body of Sqoop.

Sqoop

public Sqoop(SqoopTool tool,
             org.apache.hadoop.conf.Configuration conf)
Creates a new instance of Sqoop set to run the supplied SqoopTool with the provided configuration.

Parameters:
tool - the SqoopTool to run in the main body of Sqoop.
conf - the Configuration to use (e.g., from ToolRunner).

Sqoop

public Sqoop(SqoopTool tool,
             org.apache.hadoop.conf.Configuration conf,
             SqoopOptions opts)
Creates a new instance of Sqoop set to run the supplied SqoopTool with the provided configuration and SqoopOptions.

Parameters:
tool - the SqoopTool to run in the main body of Sqoop.
conf - the Configuration to use (e.g., from ToolRunner).
opts - the SqoopOptions which control the tool's parameters.
Method Detail

getOptions

public SqoopOptions getOptions()
Returns:
the SqoopOptions used in this Sqoop instance.

getTool

public SqoopTool getTool()
Returns:
the SqoopTool used in this Sqoop instance.

run

public int run(java.lang.String[] args)
Specified by:
run in interface org.apache.hadoop.util.Tool

runSqoop

public static int runSqoop(Sqoop sqoop,
                           java.lang.String[] args)
Given a Sqoop object and a set of arguments to deliver to its embedded SqoopTool, run the tool, wrapping the call to ToolRunner. This entry-point is preferred to ToolRunner.run() because it has a chance to stash child program arguments before GenericOptionsParser would remove them.


runTool

public static int runTool(java.lang.String[] args)
Entry-point that parses the correct SqoopTool to use from the args, but does not call System.exit() as main() will.


main

public static void main(java.lang.String[] args)


Copyright © 2010 Cloudera, Inc.