@Override
  public boolean delete(Path path, boolean recursive) throws IOException {
    LOG.debug("delete({}, {})", path, recursive);
    if (mStatistics != null) {
      mStatistics.incrementWriteOps(1);
    }
    AlluxioURI uri = new AlluxioURI(HadoopUtils.getPathWithoutScheme(path));
    DeletePOptions options = DeletePOptions.newBuilder().setRecursive(recursive).build();
    try {
      mFileSystem.delete(uri, options);
      return true;
    } catch (InvalidPathException | FileDoesNotExistException e) {
      LOG.warn("delete failed: {}", e.getMessage());
      return false;
    } catch (AlluxioException e) {
      throw new IOException(e);
    }
  }
@ Override public boolean delete ( Path path , boolean recursive ) throws IOException { LOG . debug ( "delete({}, {})" , path , recursive ) ; if ( mStatistics != null ) { mStatistics . incrementWriteOps ( 1 ) ; } AlluxioURI uri = new AlluxioURI ( HadoopUtils . getPathWithoutScheme ( path ) ) ; DeletePOptions options = DeletePOptions . newBuilder ( ) . setRecursive ( recursive ) . build ( ) ; try { mFileSystem . delete ( uri , options ) ; return true ; } catch ( InvalidPathException | FileDoesNotExistException e ) { LOG . warn ( "delete failed: {}" , e . getMessage ( ) ) ; return false ; } catch ( AlluxioException e ) { throw new IOException ( e ) ; } }
Attempts to delete the file or directory with the specified path.

@param path path to delete
@param recursive if true, will attempt to delete all children of the path
@return true if one or more files/directories were deleted; false otherwise