diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java index 6a19cc3..7e257e5 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java @@ -132,7 +132,10 @@ private void moveFile(Path sourcePath, Path targetPath, boolean isDfsDir) try { // create the destination if it does not exist if (!dstFs.exists(targetPath)) { - FileUtils.mkdir(dstFs, targetPath, false, conf); + if (!FileUtils.mkdir(dstFs, targetPath, false, conf)) { + throw new HiveException( + "Failed to create local target directory for copy:" + targetPath); + } } } catch (IOException e) { throw new HiveException("Unable to create target directory for copy" + targetPath, e);