Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kill a framework in Mesos

Tags:

mesos

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

like image 489
Aaron Avatar asked Sep 22 '14 17:09

Aaron


People also ask

Which of the following is one of the Mesos framework?

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.

What is a Mesos cluster?

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.


3 Answers

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
like image 148
js84 Avatar answered Oct 21 '22 11:10

js84


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'

like image 30
Montells Avatar answered Oct 21 '22 11:10

Montells


Riffing on @montells work, a one-liner would be

echo "frameworkId= 23423-23423-234234-234234" | curl -d@- -X POST http://localhost:5050/master/shutdown
like image 25
Brian Topping Avatar answered Oct 21 '22 10:10

Brian Topping