Llama High Availability

Llama high availability (HA) uses an active-standby architecture, in which the active Llama is automatically elected using the ZooKeeper-based ActiveStandbyElector. The active Llama accepts RPC Thrift connections and communicates with YARN. The standby Llama monitors the leader information in ZooKeeper, but doesn't accept RPC Thrift connections.

Fencing

Only one of the Llamas should be active to ensure the resources are not partitioned. Llama uses ZooKeeper access control lists (ACLs) to claim exclusive ownership of the cluster when transitioning to active, and monitors this ownership periodically. If another Llama takes over, the first one realizes it within this period.

Reclaiming Cluster Resources

To claim resources from YARN, Llama spawns YARN applications and runs unmanaged ApplicationMasters. When a Llama goes down, the resources allocated to all the YARN applications spawned by it are not reclaimed until YARN times out those applications (the default timeout is 10 minutes). On Llama failure, these resources are reclaimed by means of a Llama that kills any YARN applications spawned by this pair of Llamas.

Enabling Llama High Availability Using Cloudera Manager

You can enable Llama high availability when you enable integrated resource management. If you chose to create a single Llama instance at that time, follow these steps to enable Llama high availability:

  1. Go to the Impala service.
  2. Select Actions > Enable High Availability.
  3. Click the Impala Llama ApplicationMaster Hosts field to display a dialog for choosing Llama hosts.
    The following shortcuts for specifying hostname patterns are supported:
    • Range of hostnames (without the domain portion)
      Range Definition Matching Hosts
      10.1.1.[1-4] 10.1.1.1, 10.1.1.2, 10.1.1.3, 10.1.1.4
      host[1-3].company.com host1.company.com, host2.company.com, host3.company.com
      host[07-10].company.com host07.company.com, host08.company.com, host09.company.com, host10.company.com
    • IP addresses
    • Rack name
  4. Specify or select one or more hosts and click OK.
  5. Click Continue.
  6. Click Continue. A progress screen displays with a summary of the wizard actions.
  7. Click Finish.

Disabling Llama High Availability Using Cloudera Manager

You can disable Llama high availability when you disable integrated resource management. If you choose not to disable integrated resource management, follow these steps to disable Llama high availability:

  1. Go to the Impala service.
  2. Select Actions > Disable High Availability.
  3. Choose the host on which Llama runs after high availability is disabled.
  4. Click Continue. A progress screen displays with a summary of the wizard actions.
  5. Click Finish.

Enabling Llama High Availability Using the Command Line

  1. Configure Llama HA by modifying the following configuration properties in /etc/llama/conf/llama-site.xml. There is no need for any additional daemons.
    Property Description Default Recommended
    llama.am.cluster.id Cluster ID of the Llama pair, used to differentiate between different Llamas llama [cluster-specific]
    llama.am.ha.enabled* Whether to enable Llama HA false true
    llama.am.ha.zk-quorum* ZooKeeper quorum to use for leader election and fencing   [cluster-specific]
    llama.am.ha.zk-base Base znode for leader election and fencing data /llama [cluster-specific]
    llama.am.ha.zk-timeout-ms The session timeout, in milliseconds, for connections to ZooKeeper quorum 10000 10000
    llama.am.ha.zk-acl ACLs to control access to ZooKeeper world:anyone:rwcda [cluster-specific]
    llama.am.ha.zk-auth Authentication information to go with the ACLs   [cluster-acl-specific]

    *Required configurations

  2. Configure the Impala daemon to use the HA Llama.