public static FileInfo getFileInfo(Path src, String checksumString, String srcCMRootURI, String subDir,
      Configuration conf) throws IOException {
    FileSystem srcFs = src.getFileSystem(conf);
    if (checksumString == null) {
      return new FileInfo(srcFs, src, subDir);
    }

    Path cmPath = getCMPath(conf, src.getName(), checksumString, srcCMRootURI);
    if (!srcFs.exists(src)) {
      return new FileInfo(srcFs, src, cmPath, checksumString, false, subDir);
    }

    String currentChecksumString;
    try {
      currentChecksumString = checksumFor(src, srcFs);
    } catch (IOException ex) {
      // If the file is missing or getting modified, then refer CM path
      return new FileInfo(srcFs, src, cmPath, checksumString, false, subDir);
    }
    if ((currentChecksumString == null) || checksumString.equals(currentChecksumString)) {
      return new FileInfo(srcFs, src, cmPath, checksumString, true, subDir);
    } else {
      return new FileInfo(srcFs, src, cmPath, checksumString, false, subDir);
    }
  }
Get original file specified by src and chksumString. If the file exists and checksum
matches, return the file; otherwise, use chksumString to retrieve it from cmroot
@param src Original file location
@param checksumString Checksum of the original file
@param srcCMRootURI CM root URI of the source cluster
@param subDir Sub directory to which the source file belongs to
@param conf Hive configuration
@return Corresponding FileInfo object
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java