Skip to content
This repository was archived by the owner on Jan 9, 2020. It is now read-only.
This repository was archived by the owner on Jan 9, 2020. It is now read-only.

spark-submit must work with the local kubectl proxy endpoint #63

@foxish

Description

@foxish
~/g/s/a/spark (k8s-support-alternate-incremental=) kubectl proxy
Starting to serve on 127.0.0.1:8001

~/g/s/a/spark (k8s-support-alternate-incremental=) 
~/g/s/a/spark (k8s-support-alternate-incremental=) ./bin/spark-submit \
                                                   --deploy-mode cluster \
                                                   --class org.apache.spark.examples.SparkPi \
                                                   --master k8s://http://127.0.0.1:8001 \
                                                   --conf spark.executor.instances=5 \
                                                   --conf spark.app.name=foxish \
                                                   --conf spark.kubernetes.namespace=default \
                                                   --conf spark.kubernetes.driver.docker.image=foxish/spark-driver:0.92 \
                                                   --conf spark.kubernetes.executor.docker.image=foxish/spark-executor:0.92 \
                                                   /home/original-spark-examples_2.11-2.2.0-SNAPSHOT.jar 10000
2017-01-30 15:22:11 ERROR WatchConnectionManager:167 - Exec Failure: HTTP:200. Message:
java.net.ProtocolException: Expected HTTP 101 response but was '200 OK'
	at okhttp3.ws.WebSocketCall.createWebSocket(WebSocketCall.java:122)
	at okhttp3.ws.WebSocketCall.access$000(WebSocketCall.java:41)
	at okhttp3.ws.WebSocketCall$1.onResponse(WebSocketCall.java:97)
	at okhttp3.RealCall$AsyncCall.execute(RealCall.java:126)
	at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Exception in thread "main" io.fabric8.kubernetes.client.KubernetesClientException: 
	at io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager$1.onFailure(WatchConnectionManager.java:169)
	at okhttp3.ws.WebSocketCall$1.onResponse(WebSocketCall.java:99)
	at okhttp3.RealCall$AsyncCall.execute(RealCall.java:126)
	at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Exception in thread "OkHttp Dispatcher" java.lang.NullPointerException
	at io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager$1.onClose(WatchConnectionManager.java:254)
	at io.fabric8.kubernetes.client.dsl.internal.WatchConnectionManager$1.onFailure(WatchConnectionManager.java:197)
	at okhttp3.ws.WebSocketCall$1.onResponse(WebSocketCall.java:99)
	at okhttp3.RealCall$AsyncCall.execute(RealCall.java:126)
	at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Currently, spark-submit fails against the local endpoint obtained by running kubectl proxy. Since the fabric8 client does not support the other auth providers, we need it to work against the kubectl proxy endpoint.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions