diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/SkewJoinHandler.java ql/src/java/org/apache/hadoop/hive/ql/exec/SkewJoinHandler.java index a63466a..74e6d15 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/SkewJoinHandler.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/SkewJoinHandler.java @@ -317,14 +317,11 @@ private void commitOutputPathToFinalPath(Path specPath, Path outPath = getOperatorOutputPath(specPath); Path finalPath = getOperatorFinalPath(specPath); FileSystem fs = outPath.getFileSystem(hconf); - try { - if (!fs.rename(outPath, finalPath)) { - throw new IOException("Unable to rename output to: " + finalPath); - } - } catch (FileNotFoundException e) { - if (!ignoreNonExisting) { - throw e; - } + if (ignoreNonExisting && !fs.exists(outPath)) { + return; + } + if (!fs.rename(outPath, finalPath)) { + throw new IOException("Unable to rename output to: " + finalPath); } }