Advertisement
Guest User

Untitled

a guest
Feb 25th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  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
  2.  
  3. SqoopTool expTool=new ExportTool();
  4. SqoopOptions options=new SqoopOptions();
  5. options.setConnectString("jdbc:mysql://localhost/sample_db");
  6. options.setUsername("hive");
  7. options.setPassword("hadoop");
  8. options.setExportDir("hdfs://localhost:7002/user/warehouse/output1/part-00000");
  9. options.setTableName("warehouse");
  10. options.setInputFieldsTerminatedBy(',');
  11. expTool.run(options);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement