public static String getUniqueKey(long eventId, String db, String table, Map<String, String> ptnDesc) {
    StringBuilder sb = new StringBuilder();
    sb.append(eventId);
    sb.append('.');
    sb.append(toStringWordCharsOnly(db));
    sb.append('.');
    sb.append(toStringWordCharsOnly(table));
    sb.append('.');
    sb.append(toStringWordCharsOnly(ptnDesc));
    sb.append('.');
    sb.append(Objects.hashCode(db, table, ptnDesc));
    return sb.toString();
  }
Used to generate a unique key for a combination of given event id, dbname,
tablename and partition keyvalues. This is used to feed in a name for creating
staging directories for exports and imports. This should be idempotent given
the same values, i.e. hashcode-like, but at the same time, be guaranteed to be
different for every possible partition, while being "readable-ish". Basically,
we concat the alphanumberic versions of all of the above, along with a hashcode
of the db, tablename and ptn key-value pairs
hcatalog/webhcat/java-client/src/main/java/org/apache/hive/hcatalog/api/repl/ReplicationUtils.java