Loading...
четвер, 2 квітня 2015 р.

org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory already exists


Sqoop job fails, complains that Output directory already exists:

[cloudera@quickstart ~]$ sudo -u hdfs sqoop job --meta-connect jdbc:hsqldb:hsql://localhost:16000/sqoop --exec imp-ora-EMP-DEF
Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
15/04/02 23:21:42 INFO sqoop.Sqoop: Running Sqoop version: 1.4.5-cdh5.3.0
Enter password: 
15/04/02 23:21:49 INFO oracle.OraOopManagerFactory: Data Connector for Oracle and Hadoop is disabled.
15/04/02 23:21:49 INFO manager.SqlManager: Using default fetchSize of 1000
15/04/02 23:21:49 INFO tool.CodeGenTool: Beginning code generation
15/04/02 23:21:51 INFO manager.OracleManager: Time zone has been set to GMT
15/04/02 23:21:51 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM SOMEDB.SOMETBL t WHERE 1=0
15/04/02 23:21:52 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /opt/cloudera/parcels/CDH/lib/hadoop-0.20-mapreduce
Note: /tmp/sqoop-hdfs/compile/332a15c2f05001e880bb65c83aa3bf7b/SOMEDB_SOMETBL.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
15/04/02 23:21:54 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-hdfs/compile/332a15c2f05001e880bb65c83aa3bf7b/SOMEDB_SOMETBL.jar
15/04/02 23:21:54 INFO manager.OracleManager: Time zone has been set to GMT
15/04/02 23:21:54 INFO manager.OracleManager: Time zone has been set to GMT
15/04/02 23:21:54 INFO mapreduce.ImportJobBase: Beginning import of GOSALESDW.EMP_POSITION_DIM
15/04/02 23:21:55 INFO manager.OracleManager: Time zone has been set to GMT
15/04/02 23:21:56 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same.
15/04/02 23:21:57 INFO mapred.JobClient: Cleaning up the staging area hdfs://quickstart.cloudera:8020/user/hdfs/.staging/job_201504020733_0013
15/04/02 23:21:57 WARN security.UserGroupInformation: PriviledgedActionException as:hdfs (auth:SIMPLE) cause:org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory SOMEDB.SOMETBL already exists
15/04/02 23:21:57 ERROR tool.ImportTool: Encountered IOException running import job: org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory SOMEDB.SOMETBL already exists
at org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.checkOutputSpecs(FileOutputFormat.java:132)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:1015)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:976)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1642)
at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:976)
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:198)
at org.apache.sqoop.mapreduce.ImportJobBase.runJob(ImportJobBase.java:171)
at org.apache.sqoop.mapreduce.ImportJobBase.runImport(ImportJobBase.java:268)
at org.apache.sqoop.manager.SqlManager.importTable(SqlManager.java:665)
at org.apache.sqoop.manager.OracleManager.importTable(OracleManager.java:444)
at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:497)
at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:605)
at org.apache.sqoop.tool.JobTool.execJob(JobTool.java:228)
at org.apache.sqoop.tool.JobTool.run(JobTool.java:283)
at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)

Just delete directory via:
$ sudo -u hdfs hadoop fs -rmr SOMEDB.SOMETBL


0 коментарі:

 
TOP