Exemplo n.º 1
0
def _create_services(cluster):
    api = cu.get_api_client(cluster)

    fullversion = ('5.0.0' if cluster.hadoop_version == '5' else
                   cluster.hadoop_version)
    cm_cluster = api.create_cluster(cluster.name, fullVersion=fullversion)

    if len(pu.get_zookeepers(cluster)) > 0:
        cm_cluster.create_service(cu.ZOOKEEPER_SERVICE_NAME,
                                  ZOOKEEPER_SERVICE_TYPE)
    cm_cluster.create_service(cu.HDFS_SERVICE_NAME, HDFS_SERVICE_TYPE)
    cm_cluster.create_service(cu.YARN_SERVICE_NAME, YARN_SERVICE_TYPE)
    cm_cluster.create_service(cu.OOZIE_SERVICE_NAME, OOZIE_SERVICE_TYPE)
    if pu.get_hive_metastore(cluster):
        cm_cluster.create_service(cu.HIVE_SERVICE_NAME, HIVE_SERVICE_TYPE)
    if pu.get_hue(cluster):
        cm_cluster.create_service(cu.HUE_SERVICE_NAME, HUE_SERVICE_TYPE)
    if pu.get_spark_historyserver(cluster):
        cm_cluster.create_service(cu.SPARK_SERVICE_NAME, SPARK_SERVICE_TYPE)
    if pu.get_hbase_master(cluster):
        cm_cluster.create_service(cu.HBASE_SERVICE_NAME, HBASE_SERVICE_TYPE)
    if len(pu.get_flumes(cluster)) > 0:
        cm_cluster.create_service(cu.FLUME_SERVICE_NAME, FLUME_SERVICE_TYPE)
    if pu.get_sentry(cluster):
        cm_cluster.create_service(cu.SENTRY_SERVICE_NAME, SENTRY_SERVICE_TYPE)
    if len(pu.get_solrs(cluster)) > 0:
        cm_cluster.create_service(cu.SOLR_SERVICE_NAME, SOLR_SERVICE_TYPE)
    if pu.get_sqoop(cluster):
        cm_cluster.create_service(cu.SQOOP_SERVICE_NAME, SQOOP_SERVICE_TYPE)
    if len(pu.get_hbase_indexers(cluster)) > 0:
        cm_cluster.create_service(cu.KS_INDEXER_SERVICE_NAME,
                                  KS_INDEXER_SERVICE_TYPE)
    if pu.get_catalogserver(cluster):
        cm_cluster.create_service(cu.IMPALA_SERVICE_NAME, IMPALA_SERVICE_TYPE)
Exemplo n.º 2
0
def _create_services(cluster):
    api = cu.get_api_client(cluster)

    cm_cluster = api.create_cluster(cluster.name, CDH_VERSION)

    cm_cluster.create_service(cu.HDFS_SERVICE_NAME, HDFS_SERVICE_TYPE)
    cm_cluster.create_service(cu.YARN_SERVICE_NAME, YARN_SERVICE_TYPE)
    cm_cluster.create_service(cu.OOZIE_SERVICE_NAME, OOZIE_SERVICE_TYPE)
Exemplo n.º 3
0
def _create_services(cluster):
    api = cu.get_api_client(cluster)

    cm_cluster = api.create_cluster(cluster.name, CDH_VERSION)

    cm_cluster.create_service(cu.HDFS_SERVICE_NAME, HDFS_SERVICE_TYPE)
    cm_cluster.create_service(cu.YARN_SERVICE_NAME, YARN_SERVICE_TYPE)
    cm_cluster.create_service(cu.OOZIE_SERVICE_NAME, OOZIE_SERVICE_TYPE)
Exemplo n.º 4
0
def _create_services(cluster):
    api = cu.get_api_client(cluster)

    cm_cluster = api.create_cluster(cluster.name, CDH_VERSION)

    cm_cluster.create_service(cu.HDFS_SERVICE_NAME, HDFS_SERVICE_TYPE)
    cm_cluster.create_service(cu.YARN_SERVICE_NAME, YARN_SERVICE_TYPE)
    cm_cluster.create_service(cu.OOZIE_SERVICE_NAME, OOZIE_SERVICE_TYPE)
    if pu.get_hive_metastore(cluster):
        cm_cluster.create_service(cu.HIVE_SERVICE_NAME, HIVE_SERVICE_TYPE)
    if pu.get_hue(cluster):
        cm_cluster.create_service(cu.HUE_SERVICE_NAME, HUE_SERVICE_TYPE)
    if pu.get_spark_historyserver(cluster):
        cm_cluster.create_service(cu.SPARK_SERVICE_NAME, SPARK_SERVICE_TYPE)
Exemplo n.º 5
0
def _create_services(cluster):
    api = cu.get_api_client(cluster)

    fullversion = ('5.0.0' if cluster.hadoop_version == '5' else
                   cluster.hadoop_version)
    cm_cluster = api.create_cluster(cluster.name, fullVersion=fullversion)

    if len(pu.get_zookeepers(cluster)) > 0:
        cm_cluster.create_service(cu.ZOOKEEPER_SERVICE_NAME,
                                  ZOOKEEPER_SERVICE_TYPE)
    cm_cluster.create_service(cu.HDFS_SERVICE_NAME, HDFS_SERVICE_TYPE)
    cm_cluster.create_service(cu.YARN_SERVICE_NAME, YARN_SERVICE_TYPE)
    cm_cluster.create_service(cu.OOZIE_SERVICE_NAME, OOZIE_SERVICE_TYPE)
    if pu.get_hive_metastore(cluster):
        cm_cluster.create_service(cu.HIVE_SERVICE_NAME, HIVE_SERVICE_TYPE)
    if pu.get_hue(cluster):
        cm_cluster.create_service(cu.HUE_SERVICE_NAME, HUE_SERVICE_TYPE)
    if pu.get_spark_historyserver(cluster):
        cm_cluster.create_service(cu.SPARK_SERVICE_NAME, SPARK_SERVICE_TYPE)
    if pu.get_hbase_master(cluster):
        cm_cluster.create_service(cu.HBASE_SERVICE_NAME, HBASE_SERVICE_TYPE)
Exemplo n.º 6
0
def _await_agents(instances):
    api = cu.get_api_client(instances[0].node_group.cluster)
    timeout = 300
    LOG.debug("Waiting %(timeout)s seconds for agent connected to manager" % {
        'timeout': timeout})
    s_time = timeutils.utcnow()
    while timeutils.delta_seconds(s_time, timeutils.utcnow()) < timeout:
        hostnames = [i.fqdn() for i in instances]
        hostnames_to_manager = [h.hostname for h in api.get_all_hosts('full')]
        is_ok = True
        for hostname in hostnames:
            if hostname not in hostnames_to_manager:
                is_ok = False
                break

        if not is_ok:
            context.sleep(5)
        else:
            break
    else:
        raise ex.HadoopProvisionError(_("Cloudera agents failed to connect to"
                                        " Cloudera Manager"))
Exemplo n.º 7
0
def _await_agents(instances):
    api = cu.get_api_client(instances[0].node_group.cluster)
    timeout = 300
    LOG.debug("Waiting %(timeout)s seconds for agent connected to manager" %
              {'timeout': timeout})
    s_time = timeutils.utcnow()
    while timeutils.delta_seconds(s_time, timeutils.utcnow()) < timeout:
        hostnames = [i.fqdn() for i in instances]
        hostnames_to_manager = [h.hostname for h in api.get_all_hosts('full')]
        is_ok = True
        for hostname in hostnames:
            if hostname not in hostnames_to_manager:
                is_ok = False
                break

        if not is_ok:
            context.sleep(5)
        else:
            break
    else:
        raise ex.HadoopProvisionError(
            _("Cloudera agents failed to connect to"
              " Cloudera Manager"))
Exemplo n.º 8
0
def _create_services(cluster):
    api = cu.get_api_client(cluster)

    fullversion = ('5.0.0' if cluster.hadoop_version == '5'
                   else cluster.hadoop_version)
    cm_cluster = api.create_cluster(cluster.name,
                                    fullVersion=fullversion)

    if len(pu.get_zookeepers(cluster)) > 0:
        cm_cluster.create_service(cu.ZOOKEEPER_SERVICE_NAME,
                                  ZOOKEEPER_SERVICE_TYPE)
    cm_cluster.create_service(cu.HDFS_SERVICE_NAME, HDFS_SERVICE_TYPE)
    cm_cluster.create_service(cu.YARN_SERVICE_NAME, YARN_SERVICE_TYPE)
    cm_cluster.create_service(cu.OOZIE_SERVICE_NAME, OOZIE_SERVICE_TYPE)
    if pu.get_hive_metastore(cluster):
        cm_cluster.create_service(cu.HIVE_SERVICE_NAME, HIVE_SERVICE_TYPE)
    if pu.get_hue(cluster):
        cm_cluster.create_service(cu.HUE_SERVICE_NAME, HUE_SERVICE_TYPE)
    if pu.get_spark_historyserver(cluster):
        cm_cluster.create_service(cu.SPARK_SERVICE_NAME, SPARK_SERVICE_TYPE)
    if pu.get_hbase_master(cluster):
        cm_cluster.create_service(cu.HBASE_SERVICE_NAME, HBASE_SERVICE_TYPE)
    if len(pu.get_flumes(cluster)) > 0:
        cm_cluster.create_service(cu.FLUME_SERVICE_NAME, FLUME_SERVICE_TYPE)
    if pu.get_sentry(cluster):
        cm_cluster.create_service(cu.SENTRY_SERVICE_NAME, SENTRY_SERVICE_TYPE)
    if len(pu.get_solrs(cluster)) > 0:
        cm_cluster.create_service(cu.SOLR_SERVICE_NAME,
                                  SOLR_SERVICE_TYPE)
    if pu.get_sqoop(cluster):
        cm_cluster.create_service(cu.SQOOP_SERVICE_NAME, SQOOP_SERVICE_TYPE)
    if len(pu.get_hbase_indexers(cluster)) > 0:
        cm_cluster.create_service(cu.KS_INDEXER_SERVICE_NAME,
                                  KS_INDEXER_SERVICE_TYPE)
    if pu.get_catalogserver(cluster):
        cm_cluster.create_service(cu.IMPALA_SERVICE_NAME, IMPALA_SERVICE_TYPE)