user3764759
user3764759

Reputation: 73

Java - com.cloudera.sqoop vs. org.apache.sqoop which to import from sqoop jar?

I am confused While import library (com.cloudera.sqoop and org.apache.sqoop) and get this in eclipse (jar included sqoop-1.4.4-hadoop200.jar ) -

The method run(com.cloudera.sqoop.SqoopOptions) in the type ImportTool is not applicable for the arguments (org.apache.sqoop.SqoopOptions) with this two line (option parameter are added between this two lines)

 SqoopOptions options = new SqoopOptions();
 int ret = new ImportTool().run(options);

If I choose Cloudera method get deprecated but if I choose apache then run method doesn't accept the options argument. Here are the screenshots.

Import com.cloudera.sqoop Import org.apache.sqoop

This is also related to my question I asked earlier ( Java - MySQL to Hive Import where MySQL Running on Windows and Hive Running on Cent OS (Horton Sandbox)).

Upvotes: 4

Views: 1155

Answers (1)

Gaurav Narang
Gaurav Narang

Reputation: 31

There doesn't seem to be many changes between the two SqoopOptions implementations. You can view the diff here..

http://www.diffchecker.com/n342v2f6

I would suggest using the Cloudera SqoopOptions class with the apache ImportTool found at 'org.apache.sqoop.tool.ImportTool' directory, cause it accepts it and has most of the options available.

Upvotes: 1

Related Questions