[英]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 ) - 我很困惑虽然导入库(com.cloudera.sqoop和org.apache.sqoop)并在eclipse中得到这个(jar包括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) ImportTool类型中的方法run(com.cloudera.sqoop.SqoopOptions)不适用于带有这两行的参数(org.apache.sqoop.SqoopOptions)(在这两行之间添加了选项参数)
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. 如果我选择Cloudera方法被弃用但如果我选择apache则run方法不接受options参数。 Here are the screenshots.
这是截图。
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) ). 这也与我之前提到的问题有关( Java - MySQL到Hive导入,其中MySQL在Windows上运行,Hive在Cent OS上运行(Horton Sandbox) )。
There doesn't seem to be many changes between the two SqoopOptions implementations. 两个SqoopOptions实现之间似乎没有太多变化。 You can view the diff here..
你可以在这里查看差异..
http://www.diffchecker.com/n342v2f6 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. 我建议将Cloudera SqoopOptions类与'org.apache.sqoop.tool.ImportTool'目录中的apache ImportTool一起使用,因为它接受它并且大多数选项都可用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.