@Override
  public void onCreateTable(CreateTableEvent tableEvent) throws MetaException {
    Table t = tableEvent.getTable();
    FileIterator fileIter = MetaStoreUtils.isExternalTable(t)
                              ? null : new FileIterator(t.getSd().getLocation());
    CreateTableMessage msg =
        MessageBuilder.getInstance().buildCreateTableMessage(t, fileIter);
    NotificationEvent event =
        new NotificationEvent(0, now(), EventType.CREATE_TABLE.toString(),
            msgEncoder.getSerializer().serialize(msg));
    event.setCatName(t.isSetCatName() ? t.getCatName() : getDefaultCatalog(conf));
    event.setDbName(t.getDbName());
    event.setTableName(t.getTableName());
    process(event, tableEvent);
  }
@param tableEvent table event.
@throws MetaException
hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java