com.cloudera.sqoop.sqoopoptions和org.apache.sqoop.sqoopoptions之间有什么区别吗?

qoefvg9y  于 2021-06-03  发布在  Hadoop
关注(0)|答案(1)|浏览(300)
Iam new in sqoop.Actual iam used sqoop import & export through command line arguments.But now iam trying to implment with java.I got compile time error when calling expTool.run(sqoopoptions) when using the org.apache.sqoop.SqoopOptions package.If i am trying to use cloudera package instead of apache sqoop package.there is no compile time execption.check the below code snippet
SqoopTool expTool=new ExportTool();
     SqoopOptions options=new SqoopOptions();
     options.setConnectString("jdbc:mysql://localhost/sample_db");
     options.setUsername("hive");
     options.setPassword("hadoop");
     options.setExportDir("hdfs://localhost:7002/user/warehouse/output1/part-00000");
     options.setTableName("warehouse");
     options.setInputFieldsTerminatedBy(',');
     expTool.run(options);

apache.sqoop包的实现有什么问题吗?请帮助我。

f2uvfpb9

f2uvfpb91#

sqoop最初是在cloudera github上公开开发的,因此所有代码都存储在com.cloudera.sqoop名称空间中。在Apache软件基金会孵化期间,所有功能都被移动到Or.Apache .QooP命名空间。为了保持向后兼容性,sqoop没有删除com.cloudera.sqoop名称空间,但是建议用户使用org.apache.sqoop中的代码。有关命名空间迁移的详细信息可以在sqoopwiki[1]上找到。
链接:
1: https://cwiki.apache.org/confluence/display/sqoop/namespace+migration

相关问题