コード例 #1
0
def stop_hive_wait_hdfs(db):
    hookenv.status_set('maintenance', 'Stopping Apache Hive')
    hive = Hive(get_dist_config())
    hive.stop()
    hive.close_ports()
    remove_state('hive.started')
    hookenv.status_set('blocked', 'Waiting for Hadoop connection')
コード例 #2
0
def start_hive(hdfs, database):
    hookenv.status_set('maintenance', 'Setting up Apache Hive')
    hive = Hive(get_dist_config())
    hive.setup_hive_config()
    hive.configure_hive(database)
    hive.open_ports()
    hive.start()
    set_state('hive.started')
    hookenv.status_set('active', 'Ready')
コード例 #3
0
def start_hive(hdfs, database):
    hookenv.status_set('maintenance', 'Setting up Apache Hive')
    hive = Hive(get_dist_config())
    hive.setup_hive_config()
    hive.configure_hive(database)
    hive.open_ports()
    hive.start()
    set_state('hive.started')
    hookenv.status_set('active', 'Ready')
コード例 #4
0
def install_hive(hadoop):
    hookenv.status_set('maintenance', 'Installing base resources')

    # Hive cannot handle - in the metastore db name and
    # mysql uses the service name to name the db
    if "-" in hookenv.service_name():
        hookenv.status_set('blocked', 'Service name should not contain -. Redeploy with a different name.')
        return False

    hive = Hive(get_dist_config())
    if hive.verify_resources():
        hookenv.status_set('maintenance', 'Installing Apache Hive')
        hive.install()
        set_state('hive.installed')
        return True

    return False
コード例 #5
0
ファイル: hive.py プロジェクト: ktsakalozos/layer-apache-hive
def reconfigure_hive(hdfs, database):
    hookenv.status_set('active', 'Configuring Hive')
    hive = Hive(get_dist_config())
    hive.stop()
    hive.configure_hive(database)
    hive.start()
    hookenv.status_set('active', 'Ready')
コード例 #6
0
def install_hive(hadoop):
    hookenv.status_set('maintenance', 'Installing base resources')

    # Hive cannot handle - in the metastore db name and
    # mysql uses the service name to name the db
    if "-" in hookenv.service_name():
        hookenv.status_set(
            'blocked',
            'Service name should not contain -. Redeploy with a different name.'
        )
        return False

    hive = Hive(get_dist_config())
    if hive.verify_resources():
        hookenv.status_set('maintenance', 'Installing Apache Hive')
        hive.install()
        set_state('hive.installed')
        return True

    return False
コード例 #7
0
def stop_hive_wait_hdfs(db):
    hookenv.status_set('maintenance', 'Stopping Apache Hive')
    hive = Hive(get_dist_config())
    hive.stop()
    hive.close_ports()
    remove_state('hive.started')
    hookenv.status_set('blocked', 'Waiting for Hadoop connection')
コード例 #8
0
def missing_mysql():
    hive = Hive(get_dist_config())
    hive.new_db_connection()
    hookenv.status_set('blocked', 'Waiting for relation to database')
コード例 #9
0
def missing_mysql():
    hive = Hive(get_dist_config())
    hive.new_db_connection()
    hookenv.status_set('blocked', 'Waiting for relation to database')