public boolean delete(final String path, final boolean recursive)
      throws IOException, InterruptedException {
    return execute(new PrivilegedExceptionAction<Boolean>() {
      public Boolean run() throws Exception {
        return fs.delete(new Path(path), recursive);
      }
    });
  }
Delete

@param path      path
@param recursive delete recursive
@return success
@throws IOException
@throws InterruptedException
contrib/views/utils/src/main/java/org/apache/ambari/view/utils/hdfs/HdfsApi.java