Versions Compared

Key

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

...

This feature is enabled for the HDP 2.1 stack, as well as future versions of the stack.  Previous versions of HDP have not been verified for this feature, and may not function as desired.  In addition, earlier HDP versions may not include the HA support for the required technology.  

Getting Started with Blueprints HA

The simplest way to get started with setting up an HA cluster using Blueprints is to use the sample Blueprints in this documentation as a starting point.  This will likely be the most efficient way to obtain the full list of required properties for a given HA cluster, and can then be used as a starting point for customization.  While the samples provided describe smaller clusters (2-3 nodes) in order to provide simpler documentation, it should be straightforward to customize this initial Blueprint to suit larger clusters as well.  It is also possible to create an HA cluster with the Ambari UI, and export a Blueprint based on that cluster.  

...

Note

The JSON snippet above is not a complete Blueprint, but is used to highlight the properties that are required for HDFS NameNode HA.  

 

 

HostName Topology Substitution in Configuration Property Values

...

Example Cluster Creation Template

 

 

Code Block
{
  "blueprint" : "blueprint-hdfs-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"
        }
      ]
    } 
  ]
}

...

The following JSON snippet includes the “hbase-site” configuration typically required for a cluster that utilizes the HBase RegionServer HA feature:  

 

Code Block

{
  "configurations" : [
    {
      "hbase-site" : {
         ... 
        "hbase.regionserver.global.memstore.lowerLimit" : "0.38",
        "hbase.regionserver.global.memstore.upperLimit" : "0.4",
        "hbase.regionserver.handler.count" : "60",
        "hbase.regionserver.info.port" : "60030",
        "hbase.regionserver.storefile.refresh.period" : "20",
        "hbase.rootdir" : "hdfs://%HOSTGROUP::host_group_1%:8020/apps/hbase/data",
        "hbase.security.authentication" : "simple",
        "hbase.security.authorization" : "false",
        "hbase.superuser" : "hbase",
        "hbase.tmp.dir" : "/hadoop/hbase",
        "hbase.zookeeper.property.clientPort" : "2181",
        "hbase.zookeeper.quorum" : "%HOSTGROUP::host_group_1%,%HOSTGROUP::host_group_2%",
        "hbase.zookeeper.useMulti" : "true",
        "hfile.block.cache.size" : "0.40",
        "zookeeper.session.timeout" : "30000",
        "zookeeper.znode.parent" : "/hbase-unsecure"
      }

    }
   ]
}

 

...

Note

The JSON example above is not a complete set of “hbase-site” configurations, but rather shows the configuration settings that are relevant to HBase RegionServer HA.  In particular, the “hbase.regionserver.storefile.refresh.period” setting has been highlightedis the most relevant to HBase RegionServer HA, since this property must be set to a value greater than zero in order for the HA feature to be enabled.

...

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

 

...


Example Cluster Creation Template

 

{

Code Block
{
  
 
"blueprint" : "blueprint-hbase-
region
rs-
server-
ha",
 

  "default_password" : "default",
 

  "host_groups" :[

   {

     

    {
      "name" : "host_group_1",

     "hosts" : [         

       {

         "fqdn" :
 
      "hosts" : [         
        {
          "fqdn" : "c6401.ambari.apache.org"

       }

     ]

   },

   {

     "name" :

        }
      ]
    },
    {
      "name" : "host_group_2",
     
 
      "hosts" :
[         

       {

         
 [         
        {
          "fqdn" : "c6402.ambari.apache.org"

       }

     ]

   }

 ]

}


        }
      ]
    }
  ]
}

 

Create Cluster Instance

...

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

Code Block
POST /api/v1/clusters/my-hbase-rs-ha-cluster
 
...
[ Request Body is above Cluster Creation Template ]
...
 
202 - Accepted
{
  "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/my-hbase-rs-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. ]
...