public void addPartition(String dbName, String tableName, Map <String, String> partSpec) throws SemanticException {
    if (dbName == null) {
      throw new SemanticException("db name can not be null");
    }
    String key = getKey(normalizeIdentifier(dbName), normalizeIdentifier(tableName));
    Integer idx = updateMetaDataMap.get(key);
    if (idx == null) {
      throw new SemanticException("add partition to metadata map failed as list is not yet set for table : " + key);
    }
    updateMetaDataList.get(idx).addPartition(partSpec);
  }
Utility class to store replication state of a table.
ql/src/java/org/apache/hadoop/hive/ql/parse/repl/load/UpdatedMetaDataTracker.java