def install_flume(*args):

    flume = Flume(dist_config())
    if flume.verify_resources():
        hookenv.status_set('maintenance', 'Installing Flume Twitter agent')
        flume.install()
        set_state('flumeagent.installed')
Пример #2
0
def configure_flume(hdfs):
    hookenv.status_set('maintenance', 'Setting up Flume')
    flume = Flume(get_dist_config())
    flume.configure_flume()
    flume.restart()
    set_state('flumehdfs.started')
    hookenv.status_set('active', 'Ready (Accepting agent connections)')
Пример #3
0
def monitor_config_changes(hdfs):
    hookenv.status_set('active', 'Ready (Accepting agent connections)')
    config = hookenv.config()
    if not data_changed('configuration', config):
        return

    flume = Flume(get_dist_config())
    flume.configure_flume()
    flume.restart()
def configure_flume(flumehdfs):
    port = flumehdfs.get_flume_port()
    ip = flumehdfs.get_flume_ip()
    protocol = flumehdfs.get_flume_protocol()
    flumehdfsinfo = {'port': port, 'private-address': ip, 'protocol': protocol}
    hookenv.log("Connecting to Flume HDFS at {}:{} using {}".format(port, ip, protocol))
    hookenv.status_set('maintenance', 'Setting up Flume')
    flume = Flume(dist_config())
    flume.configure_flume(flumehdfsinfo)
    flume.restart()
    hookenv.status_set('active', 'Ready')
    set_state('flumeagent.started')
Пример #5
0
def install_flume(*args):
    flume = Flume(get_dist_config())
    if flume.verify_resources():
        hookenv.status_set('maintenance', 'Installing Flume')
        flume.install()
        set_state('flumehdfs.installed')