I have a Mesos cluster and was running a Spark shell connected to it. I shut down the client, but Mesos still believes the framework should be active.
I am trying to have Mesos drop the framework by using DELETE with curl (https://issues.apache.org/jira/browse/MESOS-1390)
but I am getting no response from the server. Also, I am not sure how exactly to connect to the master: I have a multi-master setup managed by ZooKeeper, and I was trying to connect just to the active master:
curl -X DELETE http://<active master url>:5050/framworks/<framework id>
Can anyone verify if the above is the correct request? I am using mesos-0.20.0.
Thanks
These components are known as frameworks. A Mesos framework is composed of two sub-components: Scheduler – Enables applications to schedule tasks based on available resources on all the agents. Executor – Runs on all agents and contains all the information necessary to execute any scheduled task on that agent.
Apache Mesos is an open source cluster manager that handles workloads in a distributed environment through dynamic resource sharing and isolation. Mesos is suited for the deployment and management of applications in large-scale clustered environments.
Just to keep this up to date: The master endpoint was renamed to teardown i.e. http://localhost:5050/master/teardown is the new way to go.
TEARDOWN Request (JSON):
POST /master/teardown HTTP/1.1
Host: masterhost:5050
Content-Type: application/json
frameworkId=12220-3440-12532-2345
TEARDOWN Response:
HTTP/1.1 200 Ok
There is a restfull option calling by post the url http://your_mesos:5050/master/teardown
passing frameworkId parameter
curl -d@/tmp/post.txt -X POST http://your_mesos:5050/master/teardown
/tmp/post.txt is a file with the follow content:
frameworkId=23423-23423-234234-234234
I know is late but for future askers
EDIT: The endpoint is now called teardown
.
Example (thanks @Jeff): curl -X POST http://your_mesos:5050/master/teardown -d 'frameworkId=23423-23423-234234-234234'
Riffing on @montells work, a one-liner would be
echo "frameworkId= 23423-23423-234234-234234" | curl -d@- -X POST http://localhost:5050/master/shutdown
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With