@Override
  public void onAllocWriteId(AllocWriteIdEvent allocWriteIdEvent, Connection dbConn, SQLGenerator sqlGenerator)
          throws MetaException {
    String tableName = allocWriteIdEvent.getTableName();
    String dbName = allocWriteIdEvent.getDbName();
    AllocWriteIdMessage msg = MessageBuilder.getInstance()
        .buildAllocWriteIdMessage(allocWriteIdEvent.getTxnToWriteIdList(), dbName, tableName);
    NotificationEvent event =
        new NotificationEvent(0, now(), EventType.ALLOC_WRITE_ID.toString(),
            msgEncoder.getSerializer().serialize(msg)
        );
    event.setTableName(tableName);
    event.setDbName(dbName);
    event.setCatName(getDefaultCatalog(conf));
    try {
      addNotificationLog(event, allocWriteIdEvent, dbConn, sqlGenerator);
    } catch (SQLException e) {
      throw new MetaException("Unable to execute direct SQL " + StringUtils.stringifyException(e));
    }
  }
@param allocWriteIdEvent Alloc write id event
@throws MetaException
hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java