code: private void copyToLocal(AlluxioURI srcPath, AlluxioURI dstPath) throws AlluxioException,
        IOException {
      URIStatus srcStatus = mFileSystem.getStatus(srcPath);
      File dstFile = new File(dstPath.getPath());
      if (srcStatus.isFolder()) {
        // make a local directory
        if (!dstFile.exists()) {
          if (!dstFile.mkdirs()) {
            throw new IOException("mkdir failure for directory: " + dstPath);
          } else {
            System.out.println("Create directory: " + dstPath);
          }
        }
  
        List<URIStatus> statuses;
        try {
          statuses = mFileSystem.listStatus(srcPath);
        } catch (AlluxioException e) {
          throw new IOException(e.getMessage());
        }
  
        List<String> errorMessages = new ArrayList<>();
        for (URIStatus status : statuses) {
          try {
            File subDstFile = new File(dstFile.getAbsolutePath(), status.getName());
            copyToLocal(
                new AlluxioURI(srcPath.getScheme(), srcPath.getAuthority(), status.getPath()),
                new AlluxioURI(dstPath.getScheme(), dstPath.getAuthority(), subDstFile.getPath()));
          } catch (IOException e) {
            errorMessages.add(e.getMessage());
          }
        }
  
        if (errorMessages.size() != 0) {
          throw new IOException(Joiner.on('\n').join(errorMessages));
        }
      } else {
        copyFileToLocal(srcPath, dstPath);
      }
    }
docs: Copies a file or a directory from the Alluxio filesystem to the local filesystem.
  
  @param srcPath the source {@link AlluxioURI} (could be a file or a directory)
  @param dstPath the {@link AlluxioURI} of the destination in the local filesystem