org.apache.hadoop.hive.metastore
Class MetaStoreEventListener

java.lang.Object
  extended by org.apache.hadoop.hive.metastore.MetaStoreEventListener
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
Direct Known Subclasses:
DummyListener, IpAddressListener

public abstract class MetaStoreEventListener
extends Object
implements org.apache.hadoop.conf.Configurable

This abstract class needs to be extended to provide implementation of actions that needs to be performed when a particular event occurs on a metastore. These methods are called whenever an event occurs on metastore. Status of the event whether it was successful or not is contained in container event object.


Constructor Summary
MetaStoreEventListener(org.apache.hadoop.conf.Configuration config)
           
 
Method Summary
 org.apache.hadoop.conf.Configuration getConf()
           
abstract  void onAddPartition(AddPartitionEvent partitionEvent)
           
abstract  void onAlterPartition(AlterPartitionEvent partitionEvent)
           
abstract  void onAlterTable(AlterTableEvent tableEvent)
           
abstract  void onCreateDatabase(CreateDatabaseEvent dbEvent)
           
abstract  void onCreateTable(CreateTableEvent tableEvent)
           
abstract  void onDropDatabase(DropDatabaseEvent dbEvent)
           
abstract  void onDropPartition(DropPartitionEvent partitionEvent)
           
abstract  void onDropTable(DropTableEvent tableEvent)
           
abstract  void onLoadPartitionDone(LoadPartitionDoneEvent partSetDoneEvent)
           
 void setConf(org.apache.hadoop.conf.Configuration config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetaStoreEventListener

public MetaStoreEventListener(org.apache.hadoop.conf.Configuration config)
Method Detail

onCreateTable

public abstract void onCreateTable(CreateTableEvent tableEvent)
                            throws MetaException
Parameters:
tableEvent - table event.
Throws:
MetaException

onDropTable

public abstract void onDropTable(DropTableEvent tableEvent)
                          throws MetaException
Parameters:
tableEvent - table event.
Throws:
MetaException

onAlterTable

public abstract void onAlterTable(AlterTableEvent tableEvent)
                           throws MetaException
Parameters:
tableEvent - alter table event
Throws:
MetaException

onAddPartition

public abstract void onAddPartition(AddPartitionEvent partitionEvent)
                             throws MetaException
Throws:
MetaException

onDropPartition

public abstract void onDropPartition(DropPartitionEvent partitionEvent)
                              throws MetaException
Parameters:
partitionEvent - partition event
Throws:
MetaException

onAlterPartition

public abstract void onAlterPartition(AlterPartitionEvent partitionEvent)
                               throws MetaException
Parameters:
partitionEvent - partition event
Throws:
MetaException

onCreateDatabase

public abstract void onCreateDatabase(CreateDatabaseEvent dbEvent)
                               throws MetaException
Parameters:
dbEvent - database event
Throws:
MetaException

onDropDatabase

public abstract void onDropDatabase(DropDatabaseEvent dbEvent)
                             throws MetaException
Parameters:
dbEvent - database event
Throws:
MetaException

onLoadPartitionDone

public abstract void onLoadPartitionDone(LoadPartitionDoneEvent partSetDoneEvent)
                                  throws MetaException
Parameters:
partSetDoneEvent -
Throws:
MetaException

getConf

public org.apache.hadoop.conf.Configuration getConf()
Specified by:
getConf in interface org.apache.hadoop.conf.Configurable

setConf

public void setConf(org.apache.hadoop.conf.Configuration config)
Specified by:
setConf in interface org.apache.hadoop.conf.Configurable


Copyright © 2011 The Apache Software Foundation