def serve_client(client): config = DistConfig() port = config.port('zookeeper') rest_port = config.port('zookeeper-rest') host = None network_interface = hookenv.config().get('network_interface') if network_interface: host = get_ip_for_interface(network_interface) client.send_connection(port, rest_port, host)
def serve_client(client): config = DistConfig() port = config.port('zookeeper') rest_port = config.port('zookeeper-rest') client.send_port(port, rest_port)
def client_present(client): dist = DistConfig(data=layer.options("livy")) rest_port = dist.port("livy") client.send_rest_port(rest_port) client.set_spark_started()
def client_present(client): dist = DistConfig(data=layer.options('livy')) rest_port = dist.port('livy') client.send_rest_port(rest_port) client.set_spark_started()