Browse Source

throw excetion instead of swallow it (#919)

pull/2/head
iture123 5 years ago committed by dailidong
parent
commit
2f17e71eec
  1. 4
      escheduler-common/src/main/java/cn/escheduler/common/utils/HadoopUtils.java

4
escheduler-common/src/main/java/cn/escheduler/common/utils/HadoopUtils.java

@ -288,9 +288,11 @@ public class HadoopUtils implements Closeable {
if (dstPath.isFile()) { if (dstPath.isFile()) {
if (overwrite) { if (overwrite) {
dstPath.delete(); dstPath.delete();
}else{
throw new IOException("destination file already exists!");
} }
} else { } else {
logger.error("destination file must be a file"); throw new IOException("destination file must be a file!");
} }
} }

Loading…
Cancel
Save