private void setPermissionParallel(final FileSystem outputFs, final short filesMode,
    final List<Path> traversedPath, final Configuration conf) throws IOException {
    if (filesMode <= 0) {
      return;
    }
    FsPermission perm = new FsPermission(filesMode);
    setConfigParallel(outputFs, traversedPath, (fs, path) -> {
      try {
        fs.setPermission(path, perm);
      } catch (IOException e) {
        throw new RuntimeException(
          "set permission for file " + path + " to " + filesMode + " failed", e);
      }
    }, conf);
  }
Run Map-Reduce Job to perform the files copy.
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java