You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@sqoop.apache.org by Krishnan K <kk...@gmail.com> on 2011/07/24 08:01:06 UTC
Sqoop operations through a Java API client program?
Hi All,
I'm new to Sqoop.
I understand that there are command-line options for importing/exporting
data
between RDBMS and HDFS.
I could successfully import data from MySQL to HDFS through command-line
options.
*
Now, I would like to know if Sqoop provides Java APIs to implement the Sqoop
tools (import/export)
through a Java Client Program*.
It'll be great if somebody could point me to documentations for implementing
import/export Sqoop operations
through a Java program.
Thanks.
Regards,
Krishnan
Re: Sqoop operations through a Java API client program?
Posted by Arvind Prabhakar <ar...@apache.org>.
Hi Krishnan,
If you don't mind please share some details of your use-case.
Sqoop does not yet provide an API for programmatic invocation. It is
possible to invoke it directly though but would not be very different
from command line invocation. For example you will have to ensure that
your classpath and configuration is setup correctly and that you
invoke the tool with the correct set of arguments. Output from the
tool will be directly written to standard out and you will have to
manage System.exit() calls made by Sqoop which could terminate your
VM. The issue SQOOP-19 [1] tracks this feature request.
[1] https://issues.cloudera.org/browse/SQOOP-19
Thanks,
Arvind
On Sat, Jul 23, 2011 at 11:01 PM, Krishnan K <kk...@gmail.com> wrote:
> Hi All,
>
> I'm new to Sqoop.
>
> I understand that there are command-line options for importing/exporting
> data
> between RDBMS and HDFS.
>
> I couldĀ successfully import data from MySQL to HDFS through command-line
> options.
>
> Now, I would like to know if Sqoop provides Java APIs to implement the Sqoop
> tools (import/export)
> through a Java Client Program.
>
> It'll be great if somebody could point me to documentations for implementing
> import/export Sqoop operations
> through a Java program.
>
> Thanks.
>
> Regards,
> Krishnan
>
>
>