diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractFileMergeOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractFileMergeOperator.java index 107eb9d..6c80a14 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractFileMergeOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractFileMergeOperator.java @@ -212,14 +212,13 @@ public void closeOp(boolean abort) throws HiveException { // move any incompatible files to final path if (!incompatFileSet.isEmpty()) { for (Path incompatFile : incompatFileSet) { - String fileName = incompatFile.getName(); - Path destFile = new Path(finalPath.getParent(), fileName); + Path destDir = finalPath.getParent(); try { - Utilities.renameOrMoveFiles(fs, incompatFile, destFile); + Utilities.renameOrMoveFiles(fs, incompatFile, destDir); LOG.info("Moved incompatible file " + incompatFile + " to " + - destFile); + destDir); } catch (HiveException e) { - LOG.error("Unable to move " + incompatFile + " to " + destFile); + LOG.error("Unable to move " + incompatFile + " to " + destDir); throw new IOException(e); } }