static Path getCMPath(Configuration conf, String name, String checkSum, String cmRootUri) {
    String newFileName = name + "_" + checkSum;
    int maxLength = conf.getInt(DFSConfigKeys.DFS_NAMENODE_MAX_COMPONENT_LENGTH_KEY,
        DFSConfigKeys.DFS_NAMENODE_MAX_COMPONENT_LENGTH_DEFAULT);

    if (newFileName.length() > maxLength) {
      newFileName = newFileName.substring(0, maxLength-1);
    }

    return new Path(cmRootUri, newFileName);
  }
Convert a path of file inside a partition or table (if non-partitioned)
  to a deterministic location of cmroot. So user can retrieve the file back
  with the original location plus checksum.
@param conf Hive configuration
@param name original filename
@param checkSum checksum of the file, can be retrieved by {@link #checksumFor(Path, FileSystem)}
@param cmRootUri CM Root URI. (From remote source if REPL LOAD flow. From local config if recycle.)
@return Path
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java