org.apache.hadoop.hive.ql.parse
Class MetaDataExportListener

java.lang.Object
  extended by org.apache.hadoop.hive.metastore.MetaStorePreEventListener
      extended by org.apache.hadoop.hive.ql.parse.MetaDataExportListener
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable

public class MetaDataExportListener
extends MetaStorePreEventListener

This class listens for drop events and, if set, exports the table's metadata as JSON to the trash of the user performing the drop


Field Summary
static org.apache.commons.logging.Log LOG
           
 
Constructor Summary
MetaDataExportListener(org.apache.hadoop.conf.Configuration config)
          Configure the export listener
 
Method Summary
 void onEvent(PreEventContext context)
          Listen for an event; if it is a DROP_TABLE event, call export_meta_data
 
Methods inherited from class org.apache.hadoop.hive.metastore.MetaStorePreEventListener
getConf, setConf
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
Constructor Detail

MetaDataExportListener

public MetaDataExportListener(org.apache.hadoop.conf.Configuration config)
Configure the export listener

Method Detail

onEvent

public void onEvent(PreEventContext context)
             throws org.apache.hadoop.hive.metastore.api.MetaException,
                    org.apache.hadoop.hive.metastore.api.NoSuchObjectException,
                    org.apache.hadoop.hive.metastore.api.InvalidOperationException
Listen for an event; if it is a DROP_TABLE event, call export_meta_data

Specified by:
onEvent in class MetaStorePreEventListener
Throws:
org.apache.hadoop.hive.metastore.api.MetaException
org.apache.hadoop.hive.metastore.api.NoSuchObjectException
org.apache.hadoop.hive.metastore.api.InvalidOperationException


Copyright © 2014 The Apache Software Foundation. All rights reserved.