简体   繁体   中英

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.

导入com.cloudera.sqoop导入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) ).

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM