def configure_hive(hive): hive_ip = hive.get_private_ip() hive_port = hive.get_port() hive_url = "jdbc:hive2://%s:%s" % (hive_ip, hive_port) if data_changed("hive.connect", hive_url): hookenv.status_set("maintenance", "configuring hive") zeppelin = Zeppelin() zeppelin.configure_hive(hive_url) set_state("zeppelin.hive.configured") update_status()
def configure_hive(hive): hive_ip = hive.get_private_ip() hive_port = hive.get_port() hive_url = 'jdbc:hive2://%s:%s' % (hive_ip, hive_port) if data_changed('hive.connect', hive_url): hookenv.status_set('maintenance', 'configuring hive') zeppelin = Zeppelin() zeppelin.configure_hive(hive_url) set_state('zeppelin.hive.configured') update_status()
def unconfigure_hive(): hookenv.status_set("maintenance", "removing hive relation") zeppelin = Zeppelin() zeppelin.configure_hive("jdbc:hive2://:") remove_state("zeppelin.hive.configured") update_status()
def unconfigure_hive(): hookenv.status_set('maintenance', 'removing hive relation') zeppelin = Zeppelin() zeppelin.configure_hive('jdbc:hive2://:') remove_state('zeppelin.hive.configured') update_status()