示例#1
0
文件: deploy.py 项目: a9261/sahara
def start_cluster(cluster):
    cm_cluster = cu.get_cloudera_cluster(cluster)

    hdfs = cm_cluster.get_service(cu.HDFS_SERVICE_NAME)
    cu.format_namenode(hdfs)
    cu.start_service(hdfs)

    yarn = cm_cluster.get_service(cu.YARN_SERVICE_NAME)
    cu.create_yarn_job_history_dir(yarn)
    cu.start_service(yarn)

    oozie_inst = pu.get_oozie(cluster)
    if oozie_inst:
        _install_extjs(cluster)
        oozie = cm_cluster.get_service(cu.OOZIE_SERVICE_NAME)
        cu.create_oozie_db(oozie)
        cu.install_oozie_sharelib(oozie)
        cu.start_service(oozie)

    if pu.get_hive_metastore(cluster):
        hive = cm_cluster.get_service(cu.HIVE_SERVICE_NAME)
        _configure_hive(cluster)
        cu.create_hive_metastore_db(hive)
        cu.create_hive_dirs(hive)
        cu.start_service(hive)

    if pu.get_hue(cluster):
        hue = cm_cluster.get_service(cu.HUE_SERVICE_NAME)
        cu.start_service(hue)

    if pu.get_spark_historyserver(cluster):
        _configure_spark(cluster)
        spark = cm_cluster.get_service(cu.SPARK_SERVICE_NAME)
        cu.start_service(spark)
示例#2
0
def start_cluster(cluster):
    if pu.get_oozie(cluster):
        _install_extjs(cluster)

    if pu.get_hive_metastore(cluster):
        _configure_hive(cluster)

    if pu.get_sentry(cluster):
        _configure_sentry(cluster)

    cu.first_run(cluster)

    if c_helper.is_swift_enabled(cluster):
        instances = gu.get_instances(cluster)
        _configure_swift(instances)

    if pu.get_hive_metastore(cluster):
        _put_hive_hdfs_xml(cluster)

    if pu.get_flumes(cluster):
        cm_cluster = cu.get_cloudera_cluster(cluster)
        flume = cm_cluster.get_service(cu.FLUME_SERVICE_NAME)
        cu.start_service(flume)

    cu.restart_mgmt_service(cluster)
示例#3
0
def start_cluster(cluster):
    if pu.get_oozie(cluster):
        _install_extjs(cluster)

    if pu.get_hive_metastore(cluster):
        _configure_hive(cluster)

    if pu.get_sentry(cluster):
        _configure_sentry(cluster)

    cu.first_run(cluster)

    if c_helper.is_swift_enabled(cluster):
        instances = gu.get_instances(cluster)
        _configure_swift(instances)

    if pu.get_hive_metastore(cluster):
        _put_hive_hdfs_xml(cluster)

    if pu.get_flumes(cluster):
        cm_cluster = cu.get_cloudera_cluster(cluster)
        flume = cm_cluster.get_service(cu.FLUME_SERVICE_NAME)
        cu.start_service(flume)

    cu.restart_mgmt_service(cluster)
示例#4
0
def _configure_services(cluster):
    cm_cluster = cu.get_cloudera_cluster(cluster)

    if len(pu.get_zookeepers(cluster)) > 0:
        zookeeper = cm_cluster.get_service(cu.ZOOKEEPER_SERVICE_NAME)
        zookeeper.update_config(
            _get_configs(ZOOKEEPER_SERVICE_TYPE, cluster=cluster))

    hdfs = cm_cluster.get_service(cu.HDFS_SERVICE_NAME)
    hdfs.update_config(_get_configs(HDFS_SERVICE_TYPE, cluster=cluster))

    yarn = cm_cluster.get_service(cu.YARN_SERVICE_NAME)
    yarn.update_config(_get_configs(YARN_SERVICE_TYPE, cluster=cluster))

    oozie = cm_cluster.get_service(cu.OOZIE_SERVICE_NAME)
    oozie.update_config(_get_configs(OOZIE_SERVICE_TYPE, cluster=cluster))

    if pu.get_hive_metastore(cluster):
        hive = cm_cluster.get_service(cu.HIVE_SERVICE_NAME)
        hive.update_config(_get_configs(HIVE_SERVICE_TYPE, cluster=cluster))

    if pu.get_hue(cluster):
        hue = cm_cluster.get_service(cu.HUE_SERVICE_NAME)
        hue.update_config(_get_configs(HUE_SERVICE_TYPE, cluster=cluster))

    if pu.get_spark_historyserver(cluster):
        spark = cm_cluster.get_service(cu.SPARK_SERVICE_NAME)
        spark.update_config(_get_configs(SPARK_SERVICE_TYPE, cluster=cluster))
    if pu.get_hbase_master(cluster):
        hbase = cm_cluster.get_service(cu.HBASE_SERVICE_NAME)
        hbase.update_config(_get_configs(HBASE_SERVICE_TYPE, cluster=cluster))
示例#5
0
def _configure_services(cluster):
    cm_cluster = cu.get_cloudera_cluster(cluster)

    if len(pu.get_zookeepers(cluster)) > 0:
        zookeeper = cm_cluster.get_service(cu.ZOOKEEPER_SERVICE_NAME)
        zookeeper.update_config(
            _get_configs(ZOOKEEPER_SERVICE_TYPE, cluster=cluster))

    hdfs = cm_cluster.get_service(cu.HDFS_SERVICE_NAME)
    hdfs.update_config(_get_configs(HDFS_SERVICE_TYPE, cluster=cluster))

    yarn = cm_cluster.get_service(cu.YARN_SERVICE_NAME)
    yarn.update_config(_get_configs(YARN_SERVICE_TYPE, cluster=cluster))

    oozie = cm_cluster.get_service(cu.OOZIE_SERVICE_NAME)
    oozie.update_config(_get_configs(OOZIE_SERVICE_TYPE, cluster=cluster))

    if pu.get_hive_metastore(cluster):
        hive = cm_cluster.get_service(cu.HIVE_SERVICE_NAME)
        hive.update_config(_get_configs(HIVE_SERVICE_TYPE, cluster=cluster))

    if pu.get_hue(cluster):
        hue = cm_cluster.get_service(cu.HUE_SERVICE_NAME)
        hue.update_config(_get_configs(HUE_SERVICE_TYPE, cluster=cluster))

    if pu.get_spark_historyserver(cluster):
        spark = cm_cluster.get_service(cu.SPARK_SERVICE_NAME)
        spark.update_config(_get_configs(SPARK_SERVICE_TYPE, cluster=cluster))

    if pu.get_hbase_master(cluster):
        hbase = cm_cluster.get_service(cu.HBASE_SERVICE_NAME)
        hbase.update_config(_get_configs(HBASE_SERVICE_TYPE, cluster=cluster))

    if len(pu.get_flumes(cluster)) > 0:
        flume = cm_cluster.get_service(cu.FLUME_SERVICE_NAME)
        flume.update_config(_get_configs(FLUME_SERVICE_TYPE, cluster=cluster))

    if pu.get_sentry(cluster):
        sentry = cm_cluster.get_service(cu.SENTRY_SERVICE_NAME)
        sentry.update_config(_get_configs(SENTRY_SERVICE_TYPE,
                                          cluster=cluster))

    if len(pu.get_solrs(cluster)) > 0:
        solr = cm_cluster.get_service(cu.SOLR_SERVICE_NAME)
        solr.update_config(_get_configs(SOLR_SERVICE_TYPE, cluster=cluster))

    if pu.get_sqoop(cluster):
        sqoop = cm_cluster.get_service(cu.SQOOP_SERVICE_NAME)
        sqoop.update_config(_get_configs(SQOOP_SERVICE_TYPE, cluster=cluster))

    if len(pu.get_hbase_indexers(cluster)) > 0:
        ks_indexer = cm_cluster.get_service(cu.KS_INDEXER_SERVICE_NAME)
        ks_indexer.update_config(
            _get_configs(KS_INDEXER_SERVICE_TYPE, cluster=cluster))

    if pu.get_catalogserver(cluster):
        impala = cm_cluster.get_service(cu.IMPALA_SERVICE_NAME)
        impala.update_config(_get_configs(IMPALA_SERVICE_TYPE,
                                          cluster=cluster))
示例#6
0
def _configure_services(cluster):
    cm_cluster = cu.get_cloudera_cluster(cluster)

    if len(pu.get_zookeepers(cluster)) > 0:
        zookeeper = cm_cluster.get_service(cu.ZOOKEEPER_SERVICE_NAME)
        zookeeper.update_config(_get_configs(ZOOKEEPER_SERVICE_TYPE,
                                cluster=cluster))

    hdfs = cm_cluster.get_service(cu.HDFS_SERVICE_NAME)
    hdfs.update_config(_get_configs(HDFS_SERVICE_TYPE, cluster=cluster))

    yarn = cm_cluster.get_service(cu.YARN_SERVICE_NAME)
    yarn.update_config(_get_configs(YARN_SERVICE_TYPE, cluster=cluster))

    oozie = cm_cluster.get_service(cu.OOZIE_SERVICE_NAME)
    oozie.update_config(_get_configs(OOZIE_SERVICE_TYPE, cluster=cluster))

    if pu.get_hive_metastore(cluster):
        hive = cm_cluster.get_service(cu.HIVE_SERVICE_NAME)
        hive.update_config(_get_configs(HIVE_SERVICE_TYPE, cluster=cluster))

    if pu.get_hue(cluster):
        hue = cm_cluster.get_service(cu.HUE_SERVICE_NAME)
        hue.update_config(_get_configs(HUE_SERVICE_TYPE, cluster=cluster))

    if pu.get_spark_historyserver(cluster):
        spark = cm_cluster.get_service(cu.SPARK_SERVICE_NAME)
        spark.update_config(_get_configs(SPARK_SERVICE_TYPE, cluster=cluster))

    if pu.get_hbase_master(cluster):
        hbase = cm_cluster.get_service(cu.HBASE_SERVICE_NAME)
        hbase.update_config(_get_configs(HBASE_SERVICE_TYPE, cluster=cluster))

    if len(pu.get_flumes(cluster)) > 0:
        flume = cm_cluster.get_service(cu.FLUME_SERVICE_NAME)
        flume.update_config(_get_configs(FLUME_SERVICE_TYPE, cluster=cluster))

    if pu.get_sentry(cluster):
        sentry = cm_cluster.get_service(cu.SENTRY_SERVICE_NAME)
        sentry.update_config(_get_configs(SENTRY_SERVICE_TYPE,
                                          cluster=cluster))

    if len(pu.get_solrs(cluster)) > 0:
        solr = cm_cluster.get_service(cu.SOLR_SERVICE_NAME)
        solr.update_config(_get_configs(SOLR_SERVICE_TYPE, cluster=cluster))

    if pu.get_sqoop(cluster):
        sqoop = cm_cluster.get_service(cu.SQOOP_SERVICE_NAME)
        sqoop.update_config(_get_configs(SQOOP_SERVICE_TYPE, cluster=cluster))

    if len(pu.get_hbase_indexers(cluster)) > 0:
        ks_indexer = cm_cluster.get_service(cu.KS_INDEXER_SERVICE_NAME)
        ks_indexer.update_config(_get_configs(KS_INDEXER_SERVICE_TYPE,
                                              cluster=cluster))

    if pu.get_catalogserver(cluster):
        impala = cm_cluster.get_service(cu.IMPALA_SERVICE_NAME)
        impala.update_config(_get_configs(IMPALA_SERVICE_TYPE,
                                          cluster=cluster))
示例#7
0
def _configure_services(cluster):
    cm_cluster = cu.get_cloudera_cluster(cluster)

    hdfs = cm_cluster.get_service(cu.HDFS_SERVICE_NAME)
    hdfs.update_config(_get_configs(HDFS_SERVICE_TYPE, cluster=cluster))

    yarn = cm_cluster.get_service(cu.YARN_SERVICE_NAME)
    yarn.update_config(_get_configs(YARN_SERVICE_TYPE, cluster=cluster))

    oozie = cm_cluster.get_service(cu.OOZIE_SERVICE_NAME)
    oozie.update_config(_get_configs(OOZIE_SERVICE_TYPE, cluster=cluster))
示例#8
0
文件: deploy.py 项目: viplav/sahara
def _configure_services(cluster):
    cm_cluster = cu.get_cloudera_cluster(cluster)

    hdfs = cm_cluster.get_service(cu.HDFS_SERVICE_NAME)
    hdfs.update_config(_get_configs(HDFS_SERVICE_TYPE, cluster=cluster))

    yarn = cm_cluster.get_service(cu.YARN_SERVICE_NAME)
    yarn.update_config(_get_configs(YARN_SERVICE_TYPE, cluster=cluster))

    oozie = cm_cluster.get_service(cu.OOZIE_SERVICE_NAME)
    oozie.update_config(_get_configs(OOZIE_SERVICE_TYPE, cluster=cluster))
示例#9
0
def start_cluster(cluster):
    cm_cluster = cu.get_cloudera_cluster(cluster)

    hdfs = cm_cluster.get_service(cu.HDFS_SERVICE_NAME)
    cu.format_namenode(hdfs)
    cu.start_service(hdfs)

    yarn = cm_cluster.get_service(cu.YARN_SERVICE_NAME)
    cu.create_yarn_job_history_dir(yarn)
    cu.start_service(yarn)

    oozie = cm_cluster.get_service(cu.OOZIE_SERVICE_NAME)
    cu.create_oozie_db(oozie)
    cu.install_oozie_sharelib(oozie)
    cu.start_service(oozie)
示例#10
0
文件: deploy.py 项目: viplav/sahara
def start_cluster(cluster):
    cm_cluster = cu.get_cloudera_cluster(cluster)

    hdfs = cm_cluster.get_service(cu.HDFS_SERVICE_NAME)
    cu.format_namenode(hdfs)
    cu.start_service(hdfs)

    yarn = cm_cluster.get_service(cu.YARN_SERVICE_NAME)
    cu.create_yarn_job_history_dir(yarn)
    cu.start_service(yarn)

    oozie = cm_cluster.get_service(cu.OOZIE_SERVICE_NAME)
    cu.create_oozie_db(oozie)
    cu.install_oozie_sharelib(oozie)
    cu.start_service(oozie)
示例#11
0
文件: deploy.py 项目: a9261/sahara
def _configure_services(cluster):
    cm_cluster = cu.get_cloudera_cluster(cluster)

    hdfs = cm_cluster.get_service(cu.HDFS_SERVICE_NAME)
    hdfs.update_config(_get_configs(HDFS_SERVICE_TYPE, cluster=cluster))

    yarn = cm_cluster.get_service(cu.YARN_SERVICE_NAME)
    yarn.update_config(_get_configs(YARN_SERVICE_TYPE, cluster=cluster))

    oozie = cm_cluster.get_service(cu.OOZIE_SERVICE_NAME)
    oozie.update_config(_get_configs(OOZIE_SERVICE_TYPE, cluster=cluster))

    if pu.get_hive_metastore(cluster):
        hive = cm_cluster.get_service(cu.HIVE_SERVICE_NAME)
        hive.update_config(_get_configs(HIVE_SERVICE_TYPE, cluster=cluster))

    if pu.get_hue(cluster):
        hue = cm_cluster.get_service(cu.HUE_SERVICE_NAME)
        hue.update_config(_get_configs(HUE_SERVICE_TYPE, cluster=cluster))

    if pu.get_spark_historyserver(cluster):
        spark = cm_cluster.get_service(cu.SPARK_SERVICE_NAME)
        spark.update_config(_get_configs(SPARK_SERVICE_TYPE, cluster=cluster))