Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
POST /api/v1/clusters/my-hdfs-ha-cluster
 
...
[ Request Body is above Cluster Creation Template ]
...
 
202 - Accepted
{
  "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/my-hdfs-ha-cluster/requests/1",
  "Requests" : {
    "id" : 1,
    "status" : "InProgress"
  }
}
 
...
[ Client can then monitor the URL in the 202 response to check the status of the cluster deployment. ]
...
 

 


Blueprint Example: Yarn ResourceManager HA Cluster

Summary

Yarn ResourceManager High Availability (HA) adds support for deploying two Yarn ResourceManagers in a given Yarn cluster.  This support removes the single point of failure that occurs when single ResourceManager is used.  

...

http://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/ResourceManagerHA.htmlNote:

 

Note

Ambari Blueprints will handle much of the details of server setup listed in this documentation, but the user of Ambari will need to define the various configuration properties listed in this article (yarn.resourcemanager.ha.enabled,

...

yarn.resourcemanager.hostname.$NAME_OF_RESOURCE_MANAGER

...

, etc).  The example Blueprints listed below will demonstrate the configuration properties that must be included in the Blueprint for this feature to startup the HA cluster properly.

 

  The following stack components should be included in any host group in a Blueprint that supports an HA Yarn ResourceManager

  1. RESOURCEMANAGER

  2. ZOOKEEPER_SERVER


Initial setup of Active and Standby ResourceManagers

The Yarn ResourceManager HA feature depends upon Zookeeper in order to manage the details of  the “active” or “standby” status of a given ResourceManager.  When the two ResourceManagers are starting up initially, the first ResourceManager instance to acquire a Zookeeper lock, called a “znode”, will become the “active” ResourceManager for the cluster, with the other instance assuming the role of the “standby” ResourceManager.  Note:


 

Note

The Blueprints HA feature does not support configuring the initial “active” or “standby” status of the ResourceManagers deployed in a Yarn HA cluster.  The first instance to obtain the Zookeeper lock will become the “active” node.  This allows the user to specify the host groups that contain the 2 ResourceManager instances, but also shields the user from the need to select the first “active” node.  

...


After the cluster has started up initially, the state of the “active” and “standby” ResourceManagers may change over time.  The initial “active” server is not guaranteed to remain the “active” node over the lifetime of the cluster.  During a failover event, the “standby” node may be required to fulfill the role of the “active” server. 

...


The active or standby status of a ResourceManager is not recorded or expressed when a Yarn cluster is being exported to a Blueprint, using the Blueprint REST API endpoint.  Since clusters change over time, this state is only accurate in the initial startup of the cluster. 

 

Example Blueprint

The following link includes an example Blueprint for a 3-node Yarn ResourceManager HA Cluster:

(Insert link to full Yarn ResourceManager HA Blueprint here.)yarn_ha_blueprint.json


Register Blueprint with Ambari Server

Will use the same text from John’s earlier Blueprint examples here, since the APIs used for deploying an HA Blueprint are identical to any other Blueprint.  

  1. Example Cluster Creation Template

  2. Create Cluster Instance

Post the blueprint to the "blueprint-yarn-ha" resource to the Ambari Server.


Code Block
POST /api/v1/blueprints/blueprint-yarn-ha
 
...
[ Request Body is the example blueprint defined above ]
...
 
201 - Created

 

Example Cluster Creation Template


Code Block
{
  "blueprint" : "blueprint-yarn-ha",
  "default_password" : "default",
  "host_groups" :[
    {
      "name" : "host_group_1", 
      "hosts" : [         
        {
          "fqdn" : "c6401.ambari.apache.org"
        }
      ]
    },
    {
      "name" : "host_group_2", 
      "hosts" : [         
        {
          "fqdn" : "c6402.ambari.apache.org"
        }
      ]
    },
   {
      "name" : "host_group_3", 
      "hosts" : [         
        {
          "fqdn" : "c6403.ambari.apache.org"
        }
      ]
    } 
  ]
}


 

Create Cluster Instance

 

Post the cluster to the Ambari Server to provision the cluster.

Code Block
POST /api/v1/clusters/my-yarn-ha-cluster
 
...
[ Request Body is above Cluster Creation Template ]
...
 
202 - Accepted
{
  "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/my-yarn-ha-cluster/requests/1",
  "Requests" : {
    "id" : 1,
    "status" : "InProgress"
  }
}
 
...
[ Client can then monitor the URL in the 202 response to check the status of the cluster deployment. ]
...

Will use the same text from John’s earlier Blueprint examples here, since the APIs used for deploying an HA Blueprint are identical to any other Blueprint.  



Blueprint Example: HBase RegionServer HA Cluster

...