Sqoop, mail # user - RE: Sqoop Import parallel sessions - Question - 2014-08-14, 16:13
 Search Hadoop and all its subprojects:

Switch to Threaded View
Copy link to this message
-
RE: Sqoop Import parallel sessions - Question
Sure.

This is my command. When I run 2 commands in parallel , I get the exception as mentioned below.

sqoop import --connect jdbc:oracle:thin:@<<ORACLE DB DETAILS>>  --table <Table_name>   --where "date between '01-JAN-2013' and '30-JAN-2013'" -m 1 --hive-import  --hive-table <hive tablename>  --compression-codec org.apache.hadoop.io.compress.SnappyCodec --null-string '\\N' --null-non-string '\\N' --hive-drop-import-delims;

...
...

..

sqoop import --connect jdbc:oracle:thin:@<<ORACLE DB DETAILS>>  --table <Table_name>   --where "date between '01-DEC-2013' and '31-DEC-2013'" -m 1 --hive-import  --hive-table <hive tablename>  --compression-codec org.apache.hadoop.io.compress.SnappyCodec --null-string '\\N' --null-non-string '\\N' --hive-drop-import-delims;

Exception:
14/08/14 12:04:57 ERROR tool.ImportTool: Encountered IOException running import job: org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory <SCHEMA>.<TABLENAME> already exists
        at org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:132)
        at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:987)
        at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:948)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:396)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1548)
        at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:948)
        at org.apache.hadoop.mapreduce.Job.submit(Job.java:582)
        at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:612)
        at org.apache.sqoop.mapreduce.ImportJobBase.doSubmitJob(ImportJobBase.java:186)
        at org.apache.sqoop.mapreduce.ImportJobBase.runJob(ImportJobBase.java:159)
        at org.apache.sqoop.mapreduce.ImportJobBase.runImport(ImportJobBase.java:247)
        at org.apache.sqoop.manager.SqlManager.importTable(SqlManager.java:614)
        at org.apache.sqoop.manager.OracleManager.importTable(OracleManager.java:436)
        at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:413)
        at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:506)
        at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
        at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:222)
        at org.apache.sqoop.Sqoop.runTool(Sqoop.java:231)
        at org.apache.sqoop.Sqoop.main(Sqoop.java:240)
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB