Reputation: 7658
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);
Is there any issue implmentation with apache.sqoop package?.Please help me.
Upvotes: 1
Views: 860
Reputation: 1726
Sqoop was originally developed openly on Cloudera github and thus all code was stored in com.cloudera.sqoop namespace. During incubation in Apache Software Foundation all functionality was moved to org.apache.sqoop namespace. To preserve backward compatibility Sqoop has not removed the com.cloudera.sqoop namespace, however users are advised to use code from org.apache.sqoop instead. Details about the namespace migration can be found on Sqoop wiki [1].
Links:
1: https://cwiki.apache.org/confluence/display/SQOOP/Namespace+Migration
Upvotes: 1