@Override public Boolean run() throws Exception { return runDistCp(srcPaths, dst, conf); } });
private static boolean distCp(FileSystem srcFS, List<Path> srcPaths, Path dst, boolean deleteSource, String doAsUser, Configuration conf) throws IOException { boolean copied; if (doAsUser == null){ copied = HdfsUtils.runDistCp(srcPaths, dst, conf); } else { copied = HdfsUtils.runDistCpAs(srcPaths, dst, conf, doAsUser); } if (copied && deleteSource) { for (Path path : srcPaths) { srcFS.delete(path, true); } } return copied; }