NotificationListener insteadpublic class NotificationListener extends MetaStoreEventListener
MetaStoreEventListener It sends
message on two type of topics. One has name of form dbName.tblName On this
topic, two kind of messages are sent: add/drop partition and
finalize_partition message. Second topic has name "HCAT" and messages sent on
it are: add/drop database and add/drop table. All messages also has a
property named "HCAT_EVENT" set on them whose value can be used to configure
message selector on subscriber side.| Modifier and Type | Field and Description |
|---|---|
protected javax.jms.Connection |
conn
Deprecated.
|
protected javax.jms.Session |
session
Deprecated.
|
| Constructor and Description |
|---|
NotificationListener(Configuration conf)
Deprecated.
Create message bus connection and session in constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
createConnection()
Deprecated.
|
protected void |
finalize()
Deprecated.
|
protected javax.jms.Topic |
getTopic(java.lang.String topicName)
Deprecated.
Get the topic object for the topicName, it also tries to reconnect
if the connection appears to be broken.
|
void |
onAddPartition(AddPartitionEvent partitionEvent)
Deprecated.
|
void |
onAlterPartition(AlterPartitionEvent ape)
Deprecated.
|
void |
onAlterTable(AlterTableEvent ate)
Deprecated.
|
void |
onCreateDatabase(CreateDatabaseEvent dbEvent)
Deprecated.
|
void |
onCreateTable(CreateTableEvent tableEvent)
Deprecated.
|
void |
onDropDatabase(DropDatabaseEvent dbEvent)
Deprecated.
|
void |
onDropPartition(DropPartitionEvent partitionEvent)
Deprecated.
Send dropped partition notifications.
|
void |
onDropTable(DropTableEvent tableEvent)
Deprecated.
Send dropped table notifications.
|
void |
onLoadPartitionDone(LoadPartitionDoneEvent lpde)
Deprecated.
|
protected void |
send(HCatEventMessage hCatEventMessage,
java.lang.String topicName)
Deprecated.
|
getConf, setConfprotected javax.jms.Session session
protected javax.jms.Connection conn
public NotificationListener(Configuration conf)
public void onAddPartition(AddPartitionEvent partitionEvent) throws MetaException
onAddPartition in class MetaStoreEventListenerMetaExceptionpublic void onDropPartition(DropPartitionEvent partitionEvent) throws MetaException
onDropPartition in class MetaStoreEventListenerpartitionEvent - partition eventMetaExceptionpublic void onCreateDatabase(CreateDatabaseEvent dbEvent) throws MetaException
onCreateDatabase in class MetaStoreEventListenerdbEvent - database eventMetaExceptionpublic void onDropDatabase(DropDatabaseEvent dbEvent) throws MetaException
onDropDatabase in class MetaStoreEventListenerdbEvent - database eventMetaExceptionpublic void onCreateTable(CreateTableEvent tableEvent) throws MetaException
onCreateTable in class MetaStoreEventListenertableEvent - table event.MetaExceptionpublic void onDropTable(DropTableEvent tableEvent) throws MetaException
onDropTable in class MetaStoreEventListenertableEvent - table event.MetaExceptionprotected void send(HCatEventMessage hCatEventMessage, java.lang.String topicName)
hCatEventMessage - The HCatEventMessage being sent over JMS.topicName - is the name on message broker on which message is sent.protected javax.jms.Topic getTopic(java.lang.String topicName)
throws javax.jms.JMSException
topicName - The String identifying the message-topic.Topic object corresponding to the specified topicName.javax.jms.JMSExceptionprotected void createConnection()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic void onLoadPartitionDone(LoadPartitionDoneEvent lpde) throws MetaException
onLoadPartitionDone in class MetaStoreEventListenerMetaExceptionpublic void onAlterPartition(AlterPartitionEvent ape) throws MetaException
onAlterPartition in class MetaStoreEventListenerape - partition eventMetaExceptionpublic void onAlterTable(AlterTableEvent ate) throws MetaException
onAlterTable in class MetaStoreEventListenerate - alter table eventMetaExceptionCopyright © 2012 The Apache Software Foundation