@Override
  public void onCreateDatabase(CreateDatabaseEvent dbEvent) throws MetaException {
    Database db = dbEvent.getDatabase();
    CreateDatabaseMessage msg = MessageBuilder.getInstance()
        .buildCreateDatabaseMessage(db);
    NotificationEvent event =
        new NotificationEvent(0, now(), EventType.CREATE_DATABASE.toString(),
            msgEncoder.getSerializer().serialize(msg));
    event.setCatName(db.isSetCatalogName() ? db.getCatalogName() : getDefaultCatalog(conf));
    event.setDbName(db.getName());
    process(event, dbEvent);
  }
@param dbEvent database event
@throws MetaException
hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java