[ https://issues.apache.org/jira/browse/HIVE-2720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13191809#comment-13191809 ]
Carl Steinbach commented on HIVE-2720: -------------------------------------- bq. The patch as it is, does not change the event listener calling semantics or hivemetahook calling semantics. Actually, I think this is a pretty significant change. HiveMetaStoreListener is purely a listener interface. All of the methods defined in the interface are triggered after the underlying metastore transaction has been committed or rolled back, which means that all of the methods are effectively "post" methods. Supporting more than one listener is uncomplicated because the listeners don't have the ability to affect the outcome of the operation. This patch replaces the listener interface with one that allows plugins to fail metastore operations by raising exceptions in pre-methods. I don't think this interface can support more than one plugin in a maintainable fashion for the reasons I mentioned earlier. bq. introduce HiveExtendedMetaHook interface to limited private to replace HiveMetaStoreEventListener, and allow only hive and hcat implementations (by documenting it). We guarantee correct behavior by carefully ordering the hooks. I don't see any reason to remove HiveMetaStoreListener. It's useful in its current form for writing audit and logging plugins, the implementation is good, and people are probably already using it since it appeared in the 0.8.0 release. As for the proposed HiveExtendedMetaHook interface, in practice I don't think you will be able to guarantee correct behavior by ordering the hooks, and making this a requirement places a significant burden on hook implementors. > Merge MetaStoreListener and HiveMetaHook interfaces > --------------------------------------------------- > > Key: HIVE-2720 > URL: https://issues.apache.org/jira/browse/HIVE-2720 > Project: Hive > Issue Type: Sub-task > Components: JDBC, Metastore, ODBC, Security > Reporter: Enis Soztutar > Assignee: Enis Soztutar > Attachments: HIVE-2720.D1299.1.patch, HIVE-2720.D1299.2.patch, > HIVE-2720.D1299.3.patch > > > MetaStoreListener and HiveMetaHook both serve as a notification mechanism for > metastore-related events. The former is used by hcat and the latter is by the > hbase-storage handler, and invoked by the client. > I propose to merge these interfaces, and extend the MetaStoreListener, to add > most of the on- and pre- methods at the Thrift interface. This way, extending > metastore will be easier, and validation, storage-driver notification, and > enforcement can be delegated to individual listeners. Besides, more > functionality can be plugged-in by Hcat at this level. -- 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