[
https://issues.apache.org/jira/browse/HIVE-24413?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17289803#comment-17289803
]
Alexey Vishnevskiy commented on HIVE-24413:
-------------------------------------------
Hi [~dengzh], this is true - HMS does not have much exposure to what the client
is going to do next with the result of getTable call - list fields, select
table, or even write to the table location.
Metastore is not able to control or authorize those actions. The goal of this
enhancement is to have a proper implementation of MetaStorePreEventListener
functionality.
The suggested approach is to call such a listener in the subclasses of
org.apache.thrift.ProcessFunction - all classes added to the
ThriftHiveMetastore.processMap. Such listener could be wrapped around
ProcessFunction.getResult(I iface, T args)
Please let me know what do you think.
> MetaStorePreEventListener is incomplete
> ---------------------------------------
>
> Key: HIVE-24413
> URL: https://issues.apache.org/jira/browse/HIVE-24413
> Project: Hive
> Issue Type: Improvement
> Components: Metastore
> Affects Versions: 3.1.2
> Reporter: Alexey Vishnevskiy
> Priority: Major
> Fix For: All Versions
>
>
> According to Hive documentation, MetaStorePreEventListener should be used to
> perform authorization and/or additional actions for every metastore call.
> MetaStorePreEventListener is implemented and works for some calls, but does
> not work for others. For example, It does work for calls: getTable,
> createDatabase, createTable, alterTable, alterPartition, etc... but does not
> get called for alterDatabase, getFields, getDatabases, getTableStatistics,
> etc...
> Proper implementation of MetaStorePreEventListener would require a lot of
> changes in different classes so it seems that it is better to add a similar
> listener in the descendant of org.apache.thrift.ProcessFunction and change
> ThriftHiveMetastore generated by thrift compiler to descend all
> auto-generated classes from it, not from the ProcessFunction directly. This
> applies to all versions of HiveMetastore with MetaStorePreEventListener
> implemented.
> I would like to contribute code for this functionality for the trunk - please
> let me know your suggestions and thoughts.
> Thanks!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)