Configuring Event Based Automatic Metadata Sync
As the first step to use the HMS event based metadata sync, enable and configure HMS notifications in Cloudera Manager.
- In Cloudera Manager, navigate to Clusters > Hive.
- Navigate to Configuration > Filters > SCOPE > Hive Metastore Server.
-
In Hive Metastore Server Advanced Configuration Snippet
(Safety Valve) for hive-site.xml, click
+ to expand and enter the following:
- Name: hive.metastore.notifications.add.thrift.objects
- Value: true
- Name: hive.metastore.alter.notifications.basic
- Value: false
- Name: hive.metastore.dml.events
- Value: true
- Click Save Changes.
- Navigate to Filters > SCOPE > Hive-1 (Service-Wide).
- Select Enable Metastore Notifications for DML Operations.
- Click Save Changes.
-
If you want the
INSERT
events are generated when the Spark (and other non-Hive) applications insert data into existing tables and partitions:- Navigate to Filters > SCOPE > Gateway.
- In Hive Client Advanced Configuration Snippet
(Safety Valve) for hive-site.xml, click
+ to expand and enter the following:
- Name: hive.metastore.dml.events
- Value: true
- Click Save Changes.
- Restart stale services.