gpt4 book ai didi

hadoop - com.cloudera.sqoop.SqoopOptions 与 org.apache.sqoop.SqoopOptions 之间有什么区别吗?

转载 作者:可可西里 更新时间:2023-11-01 15:41:17 24 4
gpt4 key购买 nike

    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 包的实现有什么问题吗?请帮助我。

最佳答案

Sqoop 最初是在 Cloudera github 上公开开发的,因此所有代码都存储在 com.cloudera.sqoop 命名空间中。在 Apache Software Foundation 的孵化期间,所有功能都移到了 org.apache.sqoop 命名空间。为了保持向后兼容性,Sqoop 没有删除 com.cloudera.sqoop 命名空间,但是建议用户改用 org.apache.sqoop 中的代码。有关 namespace 迁移的详细信息,请参见 Sqoop wiki [1]。

链接:

1:https://cwiki.apache.org/confluence/display/SQOOP/Namespace+Migration

关于hadoop - com.cloudera.sqoop.SqoopOptions 与 org.apache.sqoop.SqoopOptions 之间有什么区别吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12282388/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com