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

4

1 回答 1

1

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

链接:

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

于 2012-11-14T23:03:37.843 回答