public static String encodeFileUri(String fileUriStr, String fileChecksum, String cmRoot, String encodedSubDir) {
    String encodedUri = fileUriStr;
    if ((fileChecksum != null) && (cmRoot != null)) {
      encodedUri = encodedUri + URI_FRAGMENT_SEPARATOR + fileChecksum + URI_FRAGMENT_SEPARATOR + cmRoot;
    } else {
      encodedUri = encodedUri + URI_FRAGMENT_SEPARATOR + URI_FRAGMENT_SEPARATOR;
    }
    encodedUri = encodedUri + URI_FRAGMENT_SEPARATOR + ((encodedSubDir != null) ? encodedSubDir : "");
    LOG.debug("Encoded URI: " + encodedUri);
    return encodedUri;
  }
Concatenate filename, checksum, source cmroot uri and subdirectory with "#"
@param fileUriStr Filename string
@param fileChecksum Checksum string
@param encodedSubDir sub directory path into which this file belongs to. Here encoded means,
                     the multiple levels of subdirectories are concatenated with path separator "/"
@return Concatenated Uri string
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/ReplChangeManager.java