validateSameNN(source, target);
FileSystem fs = getFileSystemFor(source, context, fsConf);
Path[] pathArr = FileUtil.stat2Paths(fs.globStatus(source));
if (( pathArr == null || pathArr.length == 0 ) ){
if (!recovery) {
throw new ActionExecutorException(ActionExecutorException.ErrorType.ERROR, "FS006",
"move, source path [{0}] does not exist", source);
} else {
return;
}
}
if (pathArr.length > 1 && (!fs.exists(target) || fs.isFile(target))) {
if(!recovery) {
throw new ActionExecutorException(ActionExecutorException.ErrorType.ERROR, "FS012",
"move, could not rename multiple sources to the same target name");
} else {
return;
}
}
checkGlobMax(pathArr);
for (Path p : pathArr) {
if (!fs.rename(p, target) && !recovery) {
throw new ActionExecutorException(ActionExecutorException.ErrorType.ERROR, "FS008",
"move, could not move [{0}] to [{1}]", p, target);
}
}
}
catch (Exception ex) {