@Override
  public void onAlterDatabase(AlterDatabaseEvent dbEvent) throws MetaException {
    Database oldDb = dbEvent.getOldDatabase();
    Database newDb = dbEvent.getNewDatabase();
    AlterDatabaseMessage msg = MessageBuilder.getInstance()
        .buildAlterDatabaseMessage(oldDb, newDb);
    NotificationEvent event =
        new NotificationEvent(0, now(), EventType.ALTER_DATABASE.toString(),
            msgEncoder.getSerializer().serialize(msg)
        );
    event.setCatName(oldDb.isSetCatalogName() ? oldDb.getCatalogName() : getDefaultCatalog(conf));
    event.setDbName(oldDb.getName());
    process(event, dbEvent);
  }
@param dbEvent alter database event
@throws MetaException
hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java