@Override
  public void onCreateFunction(CreateFunctionEvent fnEvent) throws MetaException {
    Function fn = fnEvent.getFunction();
    CreateFunctionMessage msg = MessageBuilder.getInstance()
        .buildCreateFunctionMessage(fn);
    NotificationEvent event =
        new NotificationEvent(0, now(), EventType.CREATE_FUNCTION.toString(),
            msgEncoder.getSerializer().serialize(msg));
    event.setCatName(fn.isSetCatName() ? fn.getCatName() : getDefaultCatalog(conf));
    event.setDbName(fn.getDbName());
    process(event, fnEvent);
  }
@param fnEvent function event
@throws MetaException
hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java