public boolean isAncestorOf ( AlluxioURI alluxioURI ) throws InvalidPathException { // To be an ancestor of another URI, authority and scheme must match if ( ! Objects . equals ( getAuthority ( ) , alluxioURI . getAuthority ( ) ) ) { return false ; } if ( ! Objects . equals ( getScheme ( ) , alluxioURI . getScheme ( ) ) ) { return false ; } return PathUtils . hasPrefix ( PathUtils . normalizePath ( alluxioURI . getPath ( ) , SEPARATOR ) , PathUtils . normalizePath ( getPath ( ) , SEPARATOR ) ) ; }
Returns true if the current AlluxioURI is an ancestor of another AlluxioURI . otherwise return false .