To provide failover to a secondary Hive metastore if your primary instance goes
        down, you need to know how to add a Metastore role in Cloudera Manager and configure a
        property.
         Multiple HMS instances run in active/active mode. No load balancing occurs. An HMS
            client always reaches the first instance unless it is down. In this case, the client scans
            the hive.metastore.uris property that lists the HMS instances for a
            replacement HMS. The second HMS is the designated replacement if
                hive.metastore.uri.selection is set to SEQUENTIAL (recommended and
            the default); otherwise, the replacement is selected randomly from the list if
                hive.metastore.uri.selection is set to RANDOM.
        
            Minimum Required Role:
            Configurator (also provided by Cluster Administrator, Full
            Administrator)
        
        - 
                In Cloudera Manager, click .
            
 - 
                Take one of the following actions:
                
                    - If you have a cluster secured by Kerberos, search for Hive Delegation
                        Token Store, which specifies storage for the Kerberos token as described
                        below. 
 
                    - If you have an unsecured cluster, skip the next step.
 
                
             - 
                Select 
org.apache.hadoop.hive.thrift.DBTokenStore, and save
                    the change.
                
                Storage for the Kerberos delegation token is defined by the
                        hive.cluster.delegation.token.store.class property. The available
                    choices are Zookeeper, the Metastore, and memory. Cloudera recommends using the
                    database by setting the org.apache.hadoop.hive.thrift.DBTokenStore
                    property.
             - 
                Click 
                
            
 - 
                In Assign Roles, in Metastore Server, click Select Hosts.
            
 - 
                In Hosts Selected, scroll and select the host that you want to serve as the
                    backup Metastore, and click OK.
            
 - 
                Click Continue until you exit the wizard. 
            
 - 
                Start the Metastore role on the host from the Actions menu.
                
The hive.metastore.uris property is updated automatically.
             - 
                To check or to change the 
hive.metastore.uri.selection
                    property, go to , and search for Hive Service Advanced Configuration Snippet (Safety Valve) for hive-site.xml.
             - 
                Add the property and value (SEQUENTIAL or
                    RANDOM).