public void copy(final String src, final String dest) throws IOException, InterruptedException, HdfsApiException {
    boolean result = execute(new PrivilegedExceptionAction<Boolean>() {
      public Boolean run() throws Exception {
        return FileUtil.copy(fs, new Path(src), fs, new Path(dest), false, false, conf);
      }
    });

    if (!result) {
      throw new HdfsApiException("HDFS010 Can't copy source file from \" + src + \" to \" + dest");
    }
  }
Copy file

@param src  source path
@param dest destination path
@throws java.io.IOException
@throws InterruptedException
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/HdfsApi.java