private static String[] getVolumeAndBucket(Path path) {
    URI uri = path.toUri();
    final String pathStr = uri.getPath();
    StringTokenizer token = new StringTokenizer(pathStr, "/");
    int numToken = token.countTokens();

    if (numToken >= 2) {
      return new String[] { token.nextToken(), token.nextToken() };
    } else if (numToken == 1) {
      return new String[] { token.nextToken(), null };
    } else {
      return new String[] { null, null };
    }
  }
Checks whether the filesystem are equal, if they are equal and belongs to ozone then check if they belong to
same bucket and volume.
@param srcFs source filesystem
@param destFs target filesystem
@param src source path
@param dest target path
@return true if filesystems are equal, if Ozone fs, then the path belongs to same bucket-volume.
common/src/java/org/apache/hadoop/hive/common/FileUtils.java