@Override
  public void onAcidWrite(AcidWriteEvent acidWriteEvent, Connection dbConn, SQLGenerator sqlGenerator)
          throws MetaException {
    AcidWriteMessage msg = MessageBuilder.getInstance().buildAcidWriteMessage(acidWriteEvent,
            new FileChksumIterator(acidWriteEvent.getFiles(), acidWriteEvent.getChecksums(),
                    acidWriteEvent.getSubDirs()));
    NotificationEvent event = new NotificationEvent(0, now(), EventType.ACID_WRITE.toString(),
            msgEncoder.getSerializer().serialize(msg));
    event.setMessageFormat(msgEncoder.getMessageFormat());
    event.setDbName(acidWriteEvent.getDatabase());
    event.setTableName(acidWriteEvent.getTable());
    try {
      addWriteNotificationLog(Collections.singletonList(event), Collections.singletonList(acidWriteEvent),
              dbConn, sqlGenerator, Collections.singletonList(msg));
    } catch (SQLException e) {
      throw new MetaException("Unable to add write notification log " + StringUtils.stringifyException(e));
    }
  }
@param allocWriteIdEvent Alloc write id event
@throws MetaException
hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java