Vihang Karajgaonkar created SENTRY-2518:
-------------------------------------------

             Summary: Sentry should use HMS JSONFactory to parse notification 
events
                 Key: SENTRY-2518
                 URL: https://issues.apache.org/jira/browse/SENTRY-2518
             Project: Sentry
          Issue Type: Improvement
            Reporter: Vihang Karajgaonkar


Sentry currently extends {{JSONMessageFactory}} class from Metastore and adds 
additional fields to the events to get the location. Metastore 
JSONMessageFactory has evolved over time and it includes the full-thrift 
objects in most event messages. Sentry should be able to fetch the required 
information by deserializing these thrift objects from the event message.

The advantage of doing this will be users can then switch to using the 
out-of-box notification message serializers and deserializers instead of custom 
events specific for Sentry. Thus any other metastore client which relies on the 
standard notification events can be used in addition to Sentry.

 

Note that this may mean either upgrading the metastore dependency to Hive-3 or 
backporting some of the hive patches to branch-2 of Hive. I did a quick check 
and it looks like we need to port the database object in 
{{JSONCreateDatabaseMessage}} and {{DropPartitionMessage}}. The other events 
already have all the necessary information required by Sentry.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to