Exemplo n.º 1
0
def get_spark_dispatcher():
    dcos_spark_url = os.getenv("DCOS_SPARK_URL")
    if dcos_spark_url is not None:
        return dcos_spark_url

    base_url = config.get_config().get("core.dcos_url")
    return urllib.parse.urljoin(base_url, "/service/" + service.app_id() + "/")
Exemplo n.º 2
0
def get_spark_dispatcher():
    dcos_spark_url = os.getenv("DCOS_SPARK_URL")
    if dcos_spark_url is not None:
        return dcos_spark_url

    base_url = config.get_config().get('core.dcos_url')
    return urllib.parse.urljoin(base_url, '/service/' + service.app_id() + '/')
Exemplo n.º 3
0
def get_spark_dispatcher():
    dcos_spark_url = os.getenv("DCOS_SPARK_URL")
    if dcos_spark_url is not None:
        return dcos_spark_url

    base_url = util.get_config().get('core.dcos_url')
    return urllib.parse.urljoin(base_url, '/service/' + service.app_id() + '/')
Exemplo n.º 4
0
def spark_app():
    global app
    if app:
        return app

    client = marathon.create_client()
    apps = client.get_apps()
    for marathon_app in apps:
        if marathon_app.get('labels', {}).get('DCOS_PACKAGE_FRAMEWORK_NAME') \
           == service.app_id():
            app = marathon_app
            return app

    if not app:
        sys.stderr.write('No spark app found in marathon.  Quitting...\n')
        sys.exit(1)
Exemplo n.º 5
0
def spark_app():
    global app
    if app:
        return app

    client = marathon.create_client()
    apps = client.get_apps()
    for marathon_app in apps:
        if marathon_app.get('labels', {}).get('DCOS_PACKAGE_FRAMEWORK_NAME') \
           == service.app_id():
            app = marathon_app
            return app

    if not app:
        sys.stderr.write('No spark app found in marathon.  Quitting...\n')
        sys.exit(1)
Exemplo n.º 6
0
def get_spark_webui():
    base_url = config.get_config().get("core.dcos_url")
    return base_url + "/service/" + service.app_id() + "/ui"
Exemplo n.º 7
0
def get_spark_webui():
    base_url = config.get_config().get('core.dcos_url')
    return base_url + '/service/' + service.app_id() + '/ui'
Exemplo n.º 8
0
def get_spark_webui():
    base_url = util.get_config().get('core.dcos_url')
    return base_url + '/service/' + service.app_id() + '/ui'