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.

  1. In Cloudera Manager, navigate to Clusters > Hive.
  2. Navigate to Configuration > Filters > SCOPE > Hive Metastore Server.
  3. 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
  4. Click Save Changes.
  5. Navigate to Filters > SCOPE > Hive-1 (Service-Wide).
  6. Select Enable Metastore Notifications for DML Operations.
  7. Click Save Changes.
  8. If you want the INSERT events are generated when the Spark (and other non-Hive) applications insert data into existing tables and partitions:
    1. Navigate to Filters > SCOPE > Gateway.
    2. 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
    3. Click Save Changes.
  9. Restart stale services.