I have only one machine and you want to run spark jobs using mesos cluster mode. It may make sense to work with a cluster of nodes, but I basically want to check mesos first to see if it can use resources more efficiently (run multiple spark jobs at the same time without static splitting). I tried several ways, but to no avail. Here is what I did:
Create mesos and run both mesos master and slaves (2 slaves on the same computer).
sudo ./bin/mesos-master.sh --ip=127.0.0.1 --work_dir=/var/lib/mesos sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --port=5051 --work_dir=/tmp/mesos1 sudo ./bin/mesos-slave.sh --master=127.0.0.1:5050 --port=5052 --work_dir=/tmp/mesos2
Launch the spark-meso-dispatcher
sudo ./sbin/start-mesos-dispatcher.sh
Submit the app with the dispatcher as the main URL.
spark-submit --master mesos://localhost:7077 <other-config> <jar file>
But it does not work:
E0925 17:30:30.158846 807608320 socket.hpp:174] Shutdown failed on fd=61: Socket is not connected [57] E0925 17:30:30.159545 807608320 socket.hpp:174] Shutdown failed on fd=62: Socket is not connected [57]
If I use a spark-submit --deploy-mode cluster, then I got another error message:
Exception in thread "main" org.apache.spark.deploy.rest.SubmitRestConnectionException: Unable to connect to server
It works fine if I do not use the dispatcher, but directly use mesos master url: --master mesos: // localhost: 5050 (client mode). According to the documentation , cluster mode is not supported for Mesos clusters, but they give a different command for cluster mode . So what is this confusing? My question is:
- How can I make it work?
- Should I use client mode instead of cluster mode if I send the application / jar directly from the node wizard?
- If I have one computer, I must create 1 or more mesos slave processes. In principle, I have a number of spark tasks and I do not want to do a static partitioning of resources. But when using mesos without static splitting, does it look much slower?
Thanks.
auxdx source share