diff --git a/src/java/com/cloudera/sqoop/Sqoop.java b/src/java/com/cloudera/sqoop/Sqoop.java index 1a9b7c75..ab7b2eca 100644 --- a/src/java/com/cloudera/sqoop/Sqoop.java +++ b/src/java/com/cloudera/sqoop/Sqoop.java @@ -193,7 +193,7 @@ public static int runSqoop(Sqoop sqoop, String [] args) { * Entry-point that parses the correct SqoopTool to use from the args, * but does not call System.exit() as main() will. */ - public static int runTool(String [] args) { + public static int runTool(String [] args, Configuration conf) { // Expand the options String[] expandedArgs = null; try { @@ -206,7 +206,7 @@ public static int runTool(String [] args) { } String toolName = expandedArgs[0]; - Configuration pluginConf = SqoopTool.loadPlugins(new Configuration()); + Configuration pluginConf = SqoopTool.loadPlugins(conf); SqoopTool tool = SqoopTool.getTool(toolName); if (null == tool) { System.err.println("No such sqoop tool: " + toolName @@ -220,6 +220,14 @@ public static int runTool(String [] args) { Arrays.copyOfRange(expandedArgs, 1, expandedArgs.length)); } + /** + * Entry-point that parses the correct SqoopTool to use from the args, + * but does not call System.exit() as main() will. + */ + public static int runTool(String [] args) { + return runTool(args, new Configuration()); + } + public static void main(String [] args) { if (args.length == 0) { System.err.println("Try 'sqoop help' for usage.");