Falcon provides feature to replicate Hive metadata and data events from source cluster to destination cluster. This is supported for secure and unsecure cluster through Falcon Recipes.
Following is the prerequisites to use Hive DR
Note: Set following properties in hive-site.xml for replicating the Hive events on source and destination Hive cluster:
<property> <name>hive.metastore.event.listeners</name> <value>org.apache.hive.hcatalog.listener.DbNotificationListener</value> <description>event listeners that are notified of any metastore changes</description> </property> <property> <name>hive.metastore.dml.events</name> <value>true</value> </property>
Perform initial bootstrap of Table and Database from source cluster to destination cluster
$FALCON_HOME/bin/falcon entity -submit -type cluster -file /cluster/definition.xml
Update recipe properties file in addons/recipes/hive-disaster-recovery with required attributes for replicating Hive data and metadata from source cluster to destination cluster.
$FALCON_HOME/bin/falcon recipe -name hive-disaster-recovery -operation HIVE_DISASTER_RECOVERY
Recipe templates for Hive DR is available in addons/recipes/hive-disaster-recovery and copy it to recipe path (falcon.recipe.path=<recipe directory path>) by specifying in client.properties.
Note: If kerberos security is enabled on cluster, use the secure templates for Hive DR from addons/recipes/hive-disaster-recovery