Closed Arnold1 closed 6 years ago
You need to install dependencies first. Run mvn install
@ifilonenko i did that, but got this issue:
$ man install
...
...
Run completed in 23 minutes, 35 seconds.
Total number of tests run: 3160
Suites: completed 189, aborted 0
Tests: succeeded 3156, failed 4, canceled 0, ignored 53, pending 0
*** 4 TESTS FAILED ***
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Spark Project Parent POM ........................... SUCCESS [ 21.614 s]
[INFO] Spark Project Tags ................................. SUCCESS [ 9.143 s]
[INFO] Spark Project Sketch ............................... SUCCESS [ 23.532 s]
[INFO] Spark Project Networking ........................... SUCCESS [01:00 min]
[INFO] Spark Project Shuffle Streaming Service ............ SUCCESS [ 15.098 s]
[INFO] Spark Project Unsafe ............................... SUCCESS [ 18.472 s]
[INFO] Spark Project Launcher ............................. SUCCESS [ 23.050 s]
[INFO] Spark Project Core ................................. SUCCESS [21:34 min]
[INFO] Spark Project ML Local Library ..................... SUCCESS [ 40.734 s]
[INFO] Spark Project GraphX ............................... SUCCESS [01:37 min]
[INFO] Spark Project Streaming ............................ SUCCESS [06:07 min]
[INFO] Spark Project Catalyst ............................. SUCCESS [14:44 min]
[INFO] Spark Project SQL .................................. FAILURE [30:00 min]
[INFO] Spark Project ML Library ........................... SKIPPED
[INFO] Spark Project Tools ................................ SKIPPED
[INFO] Spark Project Hive ................................. SKIPPED
[INFO] Spark Project REPL ................................. SKIPPED
[INFO] Spark Project Assembly ............................. SKIPPED
[INFO] Spark Project External Flume Sink .................. SKIPPED
[INFO] Spark Project External Flume ....................... SKIPPED
[INFO] Spark Project External Flume Assembly .............. SKIPPED
[INFO] Spark Integration for Kafka 0.8 .................... SKIPPED
[INFO] Kafka 0.10 Source for Structured Streaming ......... SKIPPED
[INFO] Spark Project Examples ............................. SKIPPED
[INFO] Spark Project External Kafka Assembly .............. SKIPPED
[INFO] Spark Integration for Kafka 0.10 ................... SKIPPED
[INFO] Spark Integration for Kafka 0.10 Assembly .......... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:17 h
[INFO] Finished at: 2017-12-30T18:55:18-05:00
[INFO] Final Memory: 90M/1444M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.scalatest:scalatest-maven-plugin:1.0:test (test) on project spark-sql_2.11: There are test failures -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :spark-sql_2.11
@ifilonenko you mean the following instead?
build/mvn install -Pkubernetes -pl resource-managers/kubernetes/core -am -DskipTests
build/mvn compile -T 4C -Pkubernetes -pl resource-managers/kubernetes/core -am -DskipTests
than i can do?
dev/make-distribution.sh --tgz -Phadoop-2.7 -Pkubernetes
Yeah
@ifilonenko ok i did that 3 commands.
now i run the following. the spark output from the example still give me failed...any idea?
i start minikube:
minikube start
get minikube ip:
$ kubectl cluster-info
Kubernetes master is running at https://192.168.99.100:8443
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
run.sh script
# $ kubectl cluster-info
k8s_apiserver_host="192.168.99.100"
k8s_apiserver_port="8443"
cwd=`pwd`
echo $k8s_apiserver_host
echo $k8s_apiserver_port
echo $cwd
spark/bin/spark-submit \
--deploy-mode cluster \
--class org.apache.spark.examples.SparkPi \
--master k8s://https://$k8s_apiserver_host:$k8s_apiserver_port \
--kubernetes-namespace default \
--conf spark.executor.instances=5 \
--conf spark.app.name=spark-pi \
--conf spark.kubernetes.driver.docker.image=kubespark/spark-driver:v2.2.0-kubernetes-0.5.0 \
--conf spark.kubernetes.executor.docker.image=kubespark/spark-executor:v2.2.0-kubernetes-0.5.0 \
local:///opt/spark/examples/target/scala-2.11/jars/spark-examples_2.11-2.2.0-k8s-0.5.0.jar
here i call the run.sh script
$ ./run.sh
192.168.99.100
8443
/Users/arnold/run_spark_on_k8s
2017-12-31 12:12:26 INFO LoggingPodStatusWatcherImpl:54 - State changed, new state:
pod name: spark-pi-1514740344980-driver
namespace: default
labels: spark-app-selector -> spark-7492d2e12cd5417fb454e527e976876a, spark-role -> driver
pod uid: c5850d2e-ee4d-11e7-9c13-08002718fe97
creation time: 2017-12-31T17:12:25Z
service account name: default
volumes: spark-local-dir-0-spark-c5c62c8d-7772-40af-81bb-3ffff61a8fba, default-token-nxcnb
node name: N/A
start time: N/A
container images: N/A
phase: Pending
status: []
2017-12-31 12:12:26 INFO LoggingPodStatusWatcherImpl:54 - State changed, new state:
pod name: spark-pi-1514740344980-driver
namespace: default
labels: spark-app-selector -> spark-7492d2e12cd5417fb454e527e976876a, spark-role -> driver
pod uid: c5850d2e-ee4d-11e7-9c13-08002718fe97
creation time: 2017-12-31T17:12:25Z
service account name: default
volumes: spark-local-dir-0-spark-c5c62c8d-7772-40af-81bb-3ffff61a8fba, default-token-nxcnb
node name: minikube
start time: N/A
container images: N/A
phase: Pending
status: []
2017-12-31 12:12:26 INFO LoggingPodStatusWatcherImpl:54 - State changed, new state:
pod name: spark-pi-1514740344980-driver
namespace: default
labels: spark-app-selector -> spark-7492d2e12cd5417fb454e527e976876a, spark-role -> driver
pod uid: c5850d2e-ee4d-11e7-9c13-08002718fe97
creation time: 2017-12-31T17:12:25Z
service account name: default
volumes: spark-local-dir-0-spark-c5c62c8d-7772-40af-81bb-3ffff61a8fba, default-token-nxcnb
node name: minikube
start time: 2017-12-31T17:12:25Z
container images: kubespark/spark-driver:v2.2.0-kubernetes-0.5.0
phase: Pending
status: [ContainerStatus(containerID=null, image=kubespark/spark-driver:v2.2.0-kubernetes-0.5.0, imageID=, lastState=ContainerState(running=null, terminated=null, waiting=null, additionalProperties={}), name=spark-kubernetes-driver, ready=false, restartCount=0, state=ContainerState(running=null, terminated=null, waiting=ContainerStateWaiting(message=null, reason=ContainerCreating, additionalProperties={}), additionalProperties={}), additionalProperties={})]
2017-12-31 12:12:26 INFO Client:54 - Waiting for application spark-pi to finish...
2017-12-31 12:12:26 INFO LoggingPodStatusWatcherImpl:54 - State changed, new state:
pod name: spark-pi-1514740344980-driver
namespace: default
labels: spark-app-selector -> spark-7492d2e12cd5417fb454e527e976876a, spark-role -> driver
pod uid: c5850d2e-ee4d-11e7-9c13-08002718fe97
creation time: 2017-12-31T17:12:25Z
service account name: default
volumes: spark-local-dir-0-spark-c5c62c8d-7772-40af-81bb-3ffff61a8fba, default-token-nxcnb
node name: minikube
start time: 2017-12-31T17:12:25Z
container images: kubespark/spark-driver:v2.2.0-kubernetes-0.5.0
phase: Running
status: [ContainerStatus(containerID=docker://d80aa779d02d0964c1e61eeb167bae1e75c9da77720b2940d65ef555eaee4839, image=kubespark/spark-driver:v2.2.0-kubernetes-0.5.0, imageID=docker-pullable://kubespark/spark-driver@sha256:7539c28c4dbfc55addf5c3f439d26b964c4b04cd780a066c708242867356eb0b, lastState=ContainerState(running=null, terminated=null, waiting=null, additionalProperties={}), name=spark-kubernetes-driver, ready=true, restartCount=0, state=ContainerState(running=ContainerStateRunning(startedAt=Time(time=2017-12-31T17:12:25Z, additionalProperties={}), additionalProperties={}), terminated=null, waiting=null, additionalProperties={}), additionalProperties={})]
2017-12-31 12:12:27 INFO LoggingPodStatusWatcherImpl:54 - State changed, new state:
pod name: spark-pi-1514740344980-driver
namespace: default
labels: spark-app-selector -> spark-7492d2e12cd5417fb454e527e976876a, spark-role -> driver
pod uid: c5850d2e-ee4d-11e7-9c13-08002718fe97
creation time: 2017-12-31T17:12:25Z
service account name: default
volumes: spark-local-dir-0-spark-c5c62c8d-7772-40af-81bb-3ffff61a8fba, default-token-nxcnb
node name: minikube
start time: 2017-12-31T17:12:25Z
container images: kubespark/spark-driver:v2.2.0-kubernetes-0.5.0
phase: Failed
status: [ContainerStatus(containerID=docker://d80aa779d02d0964c1e61eeb167bae1e75c9da77720b2940d65ef555eaee4839, image=kubespark/spark-driver:v2.2.0-kubernetes-0.5.0, imageID=docker-pullable://kubespark/spark-driver@sha256:7539c28c4dbfc55addf5c3f439d26b964c4b04cd780a066c708242867356eb0b, lastState=ContainerState(running=null, terminated=null, waiting=null, additionalProperties={}), name=spark-kubernetes-driver, ready=false, restartCount=0, state=ContainerState(running=null, terminated=ContainerStateTerminated(containerID=docker://d80aa779d02d0964c1e61eeb167bae1e75c9da77720b2940d65ef555eaee4839, exitCode=1, finishedAt=Time(time=2017-12-31T17:12:26Z, additionalProperties={}), message=null, reason=Error, signal=null, startedAt=Time(time=2017-12-31T17:12:25Z, additionalProperties={}), additionalProperties={}), waiting=null, additionalProperties={}), additionalProperties={})]
2017-12-31 12:12:27 INFO LoggingPodStatusWatcherImpl:54 - Container final statuses:
Container name: spark-kubernetes-driver
Container image: kubespark/spark-driver:v2.2.0-kubernetes-0.5.0
Container state: Terminated
Exit code: 1
2017-12-31 12:12:27 INFO Client:54 - Application spark-pi finished.
We need pod logs, it failed for some reason. kubectl get logs <pod_name>
or look on dashboard after running kubectl proxy
minikube dashboard shows me, what to do?
i could try increasing memory for minikube using, any other idea?
minikube delete; minikube start --cpus 4 --memory 4096
see that worked now, all good?
2017-12-31 18:43:53 INFO LoggingPodStatusWatcherImpl:54 - State changed, new state:
pod name: spark-pi-1514763831725-driver
namespace: default
labels: spark-app-selector -> spark-03ad4433db5d46a8809d79bae90f6b1d, spark-role -> driver
pod uid: 75aa8958-ee84-11e7-85ee-080027117b36
creation time: 2017-12-31T23:43:53Z
service account name: default
volumes: spark-local-dir-0-spark-51248d16-5032-417d-8e1e-b2ed5122e9c4, default-token-thhcr
node name: N/A
start time: N/A
container images: N/A
phase: Pending
status: []
2017-12-31 18:43:53 INFO LoggingPodStatusWatcherImpl:54 - State changed, new state:
pod name: spark-pi-1514763831725-driver
namespace: default
labels: spark-app-selector -> spark-03ad4433db5d46a8809d79bae90f6b1d, spark-role -> driver
pod uid: 75aa8958-ee84-11e7-85ee-080027117b36
creation time: 2017-12-31T23:43:53Z
service account name: default
volumes: spark-local-dir-0-spark-51248d16-5032-417d-8e1e-b2ed5122e9c4, default-token-thhcr
node name: minikube
start time: N/A
container images: N/A
phase: Pending
status: []
2017-12-31 18:43:53 INFO LoggingPodStatusWatcherImpl:54 - State changed, new state:
pod name: spark-pi-1514763831725-driver
namespace: default
labels: spark-app-selector -> spark-03ad4433db5d46a8809d79bae90f6b1d, spark-role -> driver
pod uid: 75aa8958-ee84-11e7-85ee-080027117b36
creation time: 2017-12-31T23:43:53Z
service account name: default
volumes: spark-local-dir-0-spark-51248d16-5032-417d-8e1e-b2ed5122e9c4, default-token-thhcr
node name: minikube
start time: 2017-12-31T23:43:53Z
container images: kubespark/spark-driver:v2.2.0-kubernetes-0.5.0
phase: Pending
status: [ContainerStatus(containerID=null, image=kubespark/spark-driver:v2.2.0-kubernetes-0.5.0, imageID=, lastState=ContainerState(running=null, terminated=null, waiting=null, additionalProperties={}), name=spark-kubernetes-driver, ready=false, restartCount=0, state=ContainerState(running=null, terminated=null, waiting=ContainerStateWaiting(message=null, reason=ContainerCreating, additionalProperties={}), additionalProperties={}), additionalProperties={})]
2017-12-31 18:43:53 INFO Client:54 - Waiting for application spark-pi to finish...
2017-12-31 18:46:51 INFO LoggingPodStatusWatcherImpl:54 - State changed, new state:
pod name: spark-pi-1514763831725-driver
namespace: default
labels: spark-app-selector -> spark-03ad4433db5d46a8809d79bae90f6b1d, spark-role -> driver
pod uid: 75aa8958-ee84-11e7-85ee-080027117b36
creation time: 2017-12-31T23:43:53Z
service account name: default
volumes: spark-local-dir-0-spark-51248d16-5032-417d-8e1e-b2ed5122e9c4, default-token-thhcr
node name: minikube
start time: 2017-12-31T23:43:53Z
container images: kubespark/spark-driver:v2.2.0-kubernetes-0.5.0
phase: Running
status: [ContainerStatus(containerID=docker://3c58f33aa48a083a63b4b93bde4f9814d0b9794ad9073d6b27b4d0266f770a1d, image=kubespark/spark-driver:v2.2.0-kubernetes-0.5.0, imageID=docker-pullable://kubespark/spark-driver@sha256:7539c28c4dbfc55addf5c3f439d26b964c4b04cd780a066c708242867356eb0b, lastState=ContainerState(running=null, terminated=null, waiting=null, additionalProperties={}), name=spark-kubernetes-driver, ready=true, restartCount=0, state=ContainerState(running=ContainerStateRunning(startedAt=Time(time=2017-12-31T23:46:51Z, additionalProperties={}), additionalProperties={}), terminated=null, waiting=null, additionalProperties={}), additionalProperties={})]
2017-12-31 18:47:25 INFO LoggingPodStatusWatcherImpl:54 - State changed, new state:
pod name: spark-pi-1514763831725-driver
namespace: default
labels: spark-app-selector -> spark-03ad4433db5d46a8809d79bae90f6b1d, spark-role -> driver
pod uid: 75aa8958-ee84-11e7-85ee-080027117b36
creation time: 2017-12-31T23:43:53Z
service account name: default
volumes: spark-local-dir-0-spark-51248d16-5032-417d-8e1e-b2ed5122e9c4, default-token-thhcr
node name: minikube
start time: 2017-12-31T23:43:53Z
container images: kubespark/spark-driver:v2.2.0-kubernetes-0.5.0
phase: Succeeded
status: [ContainerStatus(containerID=docker://3c58f33aa48a083a63b4b93bde4f9814d0b9794ad9073d6b27b4d0266f770a1d, image=kubespark/spark-driver:v2.2.0-kubernetes-0.5.0, imageID=docker-pullable://kubespark/spark-driver@sha256:7539c28c4dbfc55addf5c3f439d26b964c4b04cd780a066c708242867356eb0b, lastState=ContainerState(running=null, terminated=null, waiting=null, additionalProperties={}), name=spark-kubernetes-driver, ready=false, restartCount=0, state=ContainerState(running=null, terminated=ContainerStateTerminated(containerID=docker://3c58f33aa48a083a63b4b93bde4f9814d0b9794ad9073d6b27b4d0266f770a1d, exitCode=0, finishedAt=Time(time=2017-12-31T23:47:25Z, additionalProperties={}), message=null, reason=Completed, signal=null, startedAt=Time(time=2017-12-31T23:46:51Z, additionalProperties={}), additionalProperties={}), waiting=null, additionalProperties={}), additionalProperties={})]
2017-12-31 18:47:25 INFO LoggingPodStatusWatcherImpl:54 - Container final statuses:
Container name: spark-kubernetes-driver
Container image: kubespark/spark-driver:v2.2.0-kubernetes-0.5.0
Container state: Terminated
Exit code: 0
2017-12-31 18:47:25 INFO Client:54 - Application spark-pi finished.
Check the logs:
$ kubectl logs `kubectl get pods --show-all | grep spark-pi | sort | head -n1 | awk '{print $1}'`
...
...
Pi is roughly 3.141315706578533
...
Looks good. Can I close this now?
last question. why do you need 5 instances? it seems it run out of cpus and can only run 3 instances...
--conf spark.executor.instances=5
This config is setting how many executors you want. It’s customizable. You do not have to set 5.
ok cool. closing it now.
Hi,
i tried to build spark as follows:
and get this error:
how to fix it?