Reply
New Contributor
Posts: 5
Registered: ‎12-17-2018

Using Sqoop ImportTool from Java application

[ Edited ]

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

 

Cloudera Employee
Posts: 70
Registered: ‎04-03-2017

Re: Using Sqoop ImportTool from Java application

Hi,

 

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

 

Regards

Nitish

Highlighted
New Contributor
Posts: 5
Registered: ‎12-17-2018

Re: Using Sqoop ImportTool from Java application

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?
Cloudera Employee
Posts: 70
Registered: ‎04-03-2017

Re: Using Sqoop ImportTool from Java application

Hi,

 

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

 

Regards

Nitish