Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Using Sqoop ImportTool from Java application

Using Sqoop ImportTool from Java application

New Contributor

Hi,

 

We are using sqoop to ingest data onto HDFS from Oracle. Because we have some additional operational requirements, like publishing the status of sqoop import into a operational database, building sql queries to import, dynamically based on the parameters passed etc.. we are invoking Sqoop from our Java application. We are directly calling ImportTool.

The sample code is available here

 

https://github.com/unmeshjoshi/hbaseservices/blob/master/src/test/scala/com/hbaseservices/sqoop/Sqoo...

 

I see that ImportTool is decrecated. So I have two questions

1. Is this way of using sqoop from within Java application something that people use?

2. Because ImportTool is depcrecated, what is the alternative recommended way?

 

Thanks,

Unmesh

 

3 REPLIES 3

Re: Using Sqoop ImportTool from Java application

Expert Contributor

Hi,

 

Generally we recommend to run the Sqoop command from CLI. This is what we support.

 

Regards

Nitish

Re: Using Sqoop ImportTool from Java application

New Contributor
Do people use ImportTool from within Java App? It seems to be working fine, and seems more convinient.
Do you see any downside of using sqoop that way?
Highlighted

Re: Using Sqoop ImportTool from Java application

Expert Contributor

Hi,

 

We don't see any downside for using that but writing the code for that is totally depend on end user.

 

Regards

Nitish