[ https://issues.apache.org/jira/browse/HIVE-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Phabricator updated HIVE-2853: ------------------------------ Attachment: HIVE-2853.D2175.2.patch kevinwilfong updated the revision "HIVE-2853 [jira] Add pre event listeners to metastore". Reviewers: JIRA, njain Instead of following the pattern used by MetaStoreEventListener, the MetaStorePreEventListener now just uses one method for all metastore methods, which takes in a context object. This context object contains an enum indicating which type of context it is, and it is up to the hook to properly cast the PreEventContext based on this. This means that to add the PreEventListener to a new metastore method, all that needs to be done is creating a new implementation of PreEventContext, and to actually add it to the method. All existing hooks should continue to work. REVISION DETAIL https://reviews.facebook.net/D2175 AFFECTED FILES metastore/src/test/org/apache/hadoop/hive/metastore/DummyPreListener.java metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java metastore/src/java/org/apache/hadoop/hive/metastore/MetaStorePreEventListener.java metastore/src/java/org/apache/hadoop/hive/metastore/events/PreCreateDatabaseEvent.java metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropDatabaseEvent.java metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropPartitionEvent.java metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAlterPartitionEvent.java metastore/src/java/org/apache/hadoop/hive/metastore/events/PreCreateTableEvent.java metastore/src/java/org/apache/hadoop/hive/metastore/events/PreDropTableEvent.java metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAlterTableEvent.java metastore/src/java/org/apache/hadoop/hive/metastore/events/PreLoadPartitionDoneEvent.java metastore/src/java/org/apache/hadoop/hive/metastore/events/PreAddPartitionEvent.java metastore/src/java/org/apache/hadoop/hive/metastore/events/PreEventContext.java common/src/java/org/apache/hadoop/hive/conf/HiveConf.java > Add pre event listeners to metastore > ------------------------------------ > > Key: HIVE-2853 > URL: https://issues.apache.org/jira/browse/HIVE-2853 > Project: Hive > Issue Type: Improvement > Reporter: Kevin Wilfong > Assignee: Kevin Wilfong > Attachments: HIVE-2853.D2175.1.patch, HIVE-2853.D2175.2.patch > > > Currently there are event listeners in the metastore which run after the > completion of a method. It would be useful to have similar hooks which run > before the metastore method is executed. These can be used to make > validating names, locations, etc. customizable. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira