sqoop-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jarek Jarcec Cecho <jar...@apache.org>
Subject Re: question about Sqoop.run(String[] args, Configuration conf) exiting after hadoop job is created
Date Mon, 02 Sep 2013 14:34:23 GMT
Hi Jane,
Sqoop 1 do not have official Java API, so this usage is not supported. As third party usage
is not intended, there is no API that would run the mapreduce job in asynchronous mode.

We've added fully fledged Java API in Sqoop2, you can take a look on the documentation at:



On Mon, Aug 26, 2013 at 05:19:55PM -0400, Jane Wayne wrote:
> hi, i am using Sqoop v1.4.4 for hadoop 0.20. i have a question about the
> following method.
> Sqoop.run(String[] args, Configuration conf)
> how can i call this method to "exit" immediately after a hadoop job has
> been created? for now, after i call this method, the whole import has to
> actually finish before any code following it will be called. for example,
> my code looks like the following.
> 1. Configuraiton conf = MyMapReduceUtil.getConf();
> 2. String[] args = { "import", "--connect", jdbcUrl, "--username",
> username, "--password", pw, "--table", table, "--target-dir", hdfsOutputDir
> };
> 3. Sqoop.runTool(args, conf);
> 4. System.out.println("finished calling sqoop");
> in the code above, i notice that line #4 is not called until the MapReduce
> import job created by Sqoop is completely finished. is this how Sqoop is
> supposed to work?
> any help is appreciated.

View raw message