Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Ambari blueprint for Hive HA | Cloudbreak

Highlighted

Ambari blueprint for Hive HA | Cloudbreak

Contributor

Hello,
Can someone please share a blueprint for Hive HA?

The blueprint I am trying, pasted below, gives me the error -
Failed to create cluster: Incorrect number of 'HIVE_SERVER' components are in '[master_2, master_3]' hostgroups: count: 2, min: 1 max: 1

I did see this, and this, new to Ambari blueprints and would like to start with min. conf.

Any help is much appreciated.

{
  "Blueprints": {
    "blueprint_name": "ha-trials",
    "stack_name": "HDP",
    "stack_version": "2.6"
  },
  "host_groups": [
    {
      "name": "edge",
      "cardinality": "1",
      "components": [
        {
          "name": "HDFS_CLIENT"
        },
        {
          "name": "MAPREDUCE2_CLIENT"
        },
        {
          "name": "METRICS_MONITOR"
        },
        {
          "name": "TEZ_CLIENT"
        },
        {
          "name": "YARN_CLIENT"
        },
        {
          "name": "ZOOKEEPER_CLIENT"
        },
        {
          "name": "PIG"
        },
        {
          "name": "SQOOP"
        },
        {
          "name": "SLIDER"
        },
        {
          "name": "HIVE_CLIENT"
        }
      ]
    },
    {
      "name": "master_1",
      "cardinality": "1",
      "components": [
        {
          "name": "HISTORYSERVER"
        },
        {
          "name": "JOURNALNODE"
        },
        {
          "name": "METRICS_MONITOR"
        },
        {
          "name": "NAMENODE"
        },
        {
          "name": "ZKFC"
        },
        {
          "name": "ZOOKEEPER_SERVER"
        },
        {
          "name": "SLIDER"
        }
      ]
    },
    {
      "name": "master_2",
      "cardinality": "1",
      "components": [
        {
          "name": "APP_TIMELINE_SERVER"
        },
        {
          "name": "JOURNALNODE"
        },
        {
          "name": "METRICS_MONITOR"
        },
        {
          "name": "RESOURCEMANAGER"
        },
        {
          "name": "ZOOKEEPER_SERVER"
        },
        {
          "name": "MYSQL_SERVER"
        },
        {
          "name": "HIVE_SERVER"
        },
        {
          "name": "HIVE_METASTORE"
        },
        {
          "name": "WEBHCAT_SERVER"
        },
        {
          "name": "TEZ_CLIENT"
        },
        {
          "name": "HIVE_CLIENT"
        },
        {
          "name": "ZOOKEEPER_CLIENT"
        }
      ]
    },
    {
      "name": "master_3",
      "cardinality": "1",
      "components": [
        {
          "name": "JOURNALNODE"
        },
        {
          "name": "METRICS_MONITOR"
        },
        {
          "name": "NAMENODE"
        },
        {
          "name": "ZKFC"
        },
        {
          "name": "ZOOKEEPER_SERVER"
        },
        {
          "name": "RESOURCEMANAGER"
        },
        {
          "name": "HIVE_SERVER"
        },
        {
          "name": "HIVE_METASTORE"
        },
        {
          "name": "WEBHCAT_SERVER"
        },
        {
          "name": "HCAT"
        },
        {
          "name": "HIVE_CLIENT"
        }
      ]
    },
    {
      "name": "slave_1",
      "components": [
        {
          "name": "DATANODE"
        },
        {
          "name": "METRICS_MONITOR"
        },
        {
          "name": "NODEMANAGER"
        },
        {
          "name": "TEZ_CLIENT"
        },
        {
          "name": "HIVE_CLIENT"
        }
      ],
      "cardinality": "3+"
    },
    {
      "name": "management",
      "configurations": [],
      "cardinality": "3+",
      "components": [
        {
          "name": "METRICS_MONITOR"
        },
        {
          "name": "METRICS_COLLECTOR"
        }
      ]
    }
  ],
  "configurations": [
    {
      "core-site": {
        "properties": {
          "fs.defaultFS": "hdfs://mycluster",
          "ha.zookeeper.quorum": "%HOSTGROUP::master_1%:2181,%HOSTGROUPHOSTGROUP::master_2%:2181,%HOSTGROUP::master_3%:2181",
          "fs.trash.interval": "4320"
        }
      }
    },
    {
      "hdfs-site": {
        "properties": {
          "dfs.client.failover.proxy.provider.mycluster": "org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider",
          "dfs.ha.automatic-failover.enabled": "true",
          "dfs.ha.fencing.methods": "shell(/bin/true)",
          "dfs.ha.namenodes.mycluster": "nn1,nn2",
          "dfs.namenode.http-address": "%HOSTGROUP::master_1%:50070",
          "dfs.namenode.http-address.mycluster.nn1": "%HOSTGROUP::master_1%:50070",
          "dfs.namenode.http-address.mycluster.nn2": "%HOSTGROUP::master_3%:50070",
          "dfs.namenode.https-address": "%HOSTGROUP::master_1%:50470",
          "dfs.namenode.https-address.mycluster.nn1": "%HOSTGROUP::master_1%:50470",
          "dfs.namenode.https-address.mycluster.nn2": "%HOSTGROUP::master_3%:50470",
          "dfs.namenode.rpc-address.mycluster.nn1": "%HOSTGROUP::master_1%:8020",
          "dfs.namenode.rpc-address.mycluster.nn2": "%HOSTGROUP::master_3%:8020",
          "dfs.namenode.shared.edits.dir": "qjournal://%HOSTGROUP::master_1%:8485;%HOSTGROUP::master_2%:8485;%HOSTGROUP::master_3%:8485/mycluster",
          "dfs.nameservices": "mycluster",
          "dfs.namenode.safemode.threshold-pct": "0.99"
        }
      }
    },
    {
      "yarn-site": {
        "properties": {
          "hadoop.registry.rm.enabled": "false",
          "hadoop.registry.zk.quorum": "%HOSTGROUP::master_3%:2181,%HOSTGROUP::master_2%:2181,%HOSTGROUP::master_1%:2181",
          "yarn.log.server.url": "http://%HOSTGROUP::master_2%:19888/jobhistory/logs",
          "yarn.resourcemanager.address": "%HOSTGROUP::master_2%:8050",
          "yarn.resourcemanager.admin.address": "%HOSTGROUP::master_2%:8141",
          "yarn.resourcemanager.cluster-id": "yarn-cluster",
          "yarn.resourcemanager.ha.automatic-failover.zk-base-path": "/yarn-leader-election",
          "yarn.resourcemanager.ha.enabled": "true",
          "yarn.resourcemanager.ha.rm-ids": "rm1,rm2",
          "yarn.resourcemanager.hostname": "%HOSTGROUP::master_2%",
          "yarn.resourcemanager.recovery.enabled": "true",
          "yarn.resourcemanager.resource-tracker.address": "%HOSTGROUP::master_2%:8025",
          "yarn.resourcemanager.scheduler.address": "%HOSTGROUP::master_2%:8030",
          "yarn.resourcemanager.store.class": "org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore",
          "yarn.resourcemanager.webapp.address": "%HOSTGROUP::master_2%:8088",
          "yarn.resourcemanager.webapp.https.address": "%HOSTGROUP::master_2%:8090",
          "yarn.timeline-service.address": "%HOSTGROUP::master_2%:10200",
          "yarn.timeline-service.webapp.address": "%HOSTGROUP::master_2%:8188",
          "yarn.timeline-service.webapp.https.address": "%HOSTGROUP::master_2%:8190",
          "yarn.resourcemanager.zk-address": "%HOSTGROUP::master_2%:2181,%HOSTGROUP::master_1%:2181,%HOSTGROUP::master_3%:2181",
          "yarn.resourcemanager.hostname.rm1": "%HOSTGROUP::master_2%",
          "yarn.resourcemanager.hostname.rm2": "%HOSTGROUP::master_3%",
          "yarn.acl.enable": "true"
        }
      }
    },
    {
      "hive-env": {
        "properties": {
          "cost_based_optimizer": "On",
          "hcat_log_dir": "/var/log/webhcat",
          "hcat_pid_dir": "/var/run/webhcat",
          "hcat_user": "hcat",
          "hive_ambari_database": "MySQL",
          "hive_database": "New MySQL Database",
          "hive_database_name": "hive",
          "hive_database_type": "mysql",
          "hive_exec_orc_storage_strategy": "SPEED",
          "hive_log_dir": "/var/log/hive",
          "hive_metastore_port": "9083",
          "hive_pid_dir": "/var/run/hive",
          "hive_security_authorization": "None",
          "hive_timeline_logging_enabled": "true",
          "hive_txn_acid": "Off",
          "hive_user": "hive",
          "webhcat_user": "hcat"
        }
      }
    },
    {
      "hive-site": {
        "hive.exec.compress.output": "true",
        "hive.merge.mapfiles": "true",
        "hive.server2.tez.initialize.default.sessions": "true",
        "hive.server2.transport.mode": "http",
        "ambari.hive.db.schema.name": "hive",
        "hive.zookeeper.client.port": "2181",
        "hive.zookeeper.namespace": "hive_zookeeper_namespace",
        "hive.zookeeper.quorum": "%HOSTGROUP::master_2%:2181,%HOSTGROUP::master_1%:2181,%HOSTGROUP::master_3%:2181",
        "javax.jdo.option.ConnectionDriverName": "com.mysql.jdbc.Driver",
        "javax.jdo.option.ConnectionURL": "jdbc:mysql://%HOSTGROUP::master_2%/hive?createDatabaseIfNotExist=true",
        "javax.jdo.option.ConnectionUserName": "hive"
      }
    }
  ]
}
2 REPLIES 2
Highlighted

Re: Ambari blueprint for Hive HA | Cloudbreak

Mentor

@Airawat

Can you try removing the below compnents for Master 3

 {"name": "WEBHCAT_SERVER"},
 { "name": "HCAT"},

And launch the blueprint

Re: Ambari blueprint for Hive HA | Cloudbreak

Contributor

Thanks. Tried it, and it did not work, @Geoffrey Shelton Okot

Don't have an account?
Coming from Hortonworks? Activate your account here