You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@sqoop.apache.org by David Kincaid <ki...@gmail.com> on 2013/05/23 01:51:11 UTC

SqoopOptions class

We're using Sqoop 1.4.3 and are wiring it into our Java app using the
information on StackOverflow (
http://stackoverflow.com/questions/9229611/how-to-use-sqoop-in-java-program?rq=1).
I understand it's not supported, but since it's our only option we're using
it.

In doing this I noticed that the class com.cloudera.sqoop.SqoopOptions is
marked deprecated yet all of the tools (like ExportTool) run() methods
require that object. What is supposed to be used instead of that class?

Is there work underway to provide a Java API interface to Sqoop that is
supported? It seems to me you're almost there since it seems to all be
working (at least for our needs).

Thanks,

Dave

Re: SqoopOptions class

Posted by Jarek Jarcec Cecho <ja...@apache.org>.
Hi David,
all classes in namespace com.cloudera are deprecated as the functionality was moved to org.apache namespace instead. However as we wanted to remain binary compatible with existing connectors, we've done the transition into different namespace very carefully. You can find more background about that on our wiki [1]. To put it into nutshell, you will need to use this deprecated class at the moment.

There is couple of things that you should be aware when using Sqoop directly:

* You need to take care of all dependencies (hadoop jars, JDBC drivers)
* You need to make sure that Hadoop configuration files are properly loaded
* Sqoop is not thread safe
* And probably some others as well :-)

We've put significant effort into designing Sqoop 2 Client API. We are still not completely finished, but you can read about it right now in Sqoop 1.99.2 documentation [2].

Jarcec

Links:
1: https://cwiki.apache.org/confluence/display/SQOOP/Namespace+Migration
2: http://sqoop.apache.org/docs/1.99.2/ClientAPI.html

On Wed, May 22, 2013 at 06:51:11PM -0500, David Kincaid wrote:
> We're using Sqoop 1.4.3 and are wiring it into our Java app using the
> information on StackOverflow (
> http://stackoverflow.com/questions/9229611/how-to-use-sqoop-in-java-program?rq=1).
> I understand it's not supported, but since it's our only option we're using
> it.
> 
> In doing this I noticed that the class com.cloudera.sqoop.SqoopOptions is
> marked deprecated yet all of the tools (like ExportTool) run() methods
> require that object. What is supposed to be used instead of that class?
> 
> Is there work underway to provide a Java API interface to Sqoop that is
> supported? It seems to me you're almost there since it seems to all be
> working (at least for our needs).
> 
> Thanks,
> 
> Dave