public static boolean isEqualFileSystemAndSameOzoneBucket(FileSystem srcFs, FileSystem destFs, Path src, Path dest) {
    if (!equalsFileSystem(srcFs, destFs)) {
      return false;
    }
    if (srcFs.getScheme().equalsIgnoreCase("ofs") || srcFs.getScheme().equalsIgnoreCase("o3fs")) {
      return isSameOzoneBucket(src, dest);
    }
    return true;
  }
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