@Override
  public void onEvent(PreEventContext context) throws MetaException, NoSuchObjectException,
      InvalidOperationException {
    if (context.getEventType() == PreEventType.DROP_TABLE) {
      export_meta_data((PreDropTableEvent) context);
    }
  }
Listen for an event; if it is a DROP_TABLE event, call export_meta_data
ql/src/java/org/apache/hadoop/hive/ql/parse/MetaDataExportListener.java