Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Can we able to kill particular container in the cluster using yarn command or REST API?

avatar
Expert Contributor
 
1 ACCEPTED SOLUTION

avatar
@Ram D

Did you take a look at this.

https://slider.incubator.apache.org/docs/manpage.html

Commands for testing

These operations are here primarily for testing.

kill-container <name> --id container-id

Kill a YARN container belong to the application. This is useful primarily for testing the resilience to failures.

Container IDs can be determined from the application instance status JSON document.

View solution in original post

6 REPLIES 6

avatar
Master Mentor

@Ram D

To kill an Application you can also use the Application State by using a PUT operation to set the application state to KILLED. For example:

curl -v -X PUT -d '{"state": "KILLED"}''http://localhost:8088/ws/v1/cluster/apps/application_1409421698529_0012'

Hope that helps

avatar
Expert Contributor

@Geoffrey Shelton OkotI am asking to kill the container directly. I am aware of killing application. Thank you.

avatar
Expert Contributor

@Geoffrey Shelton Okot we are writing a multi-node application that "heals" itself when a node is lost. In order to test the "healing" process we need to kill one of the node containers. Is there a way to do this? Is there any application in the Hadoop ecosystem that does this?

We are running our packages through slider in hadoop cluster as long running jobs.

avatar

use the slider kill-container command; it's how we test slider apps resilience to failure. There's also a built in chaos-monkey in slider; you can configure the AM to randomly kill containers (and/or its own). See Configuring the Chaos Monkey

avatar
@Ram D

Did you take a look at this.

https://slider.incubator.apache.org/docs/manpage.html

Commands for testing

These operations are here primarily for testing.

kill-container <name> --id container-id

Kill a YARN container belong to the application. This is useful primarily for testing the resilience to failures.

Container IDs can be determined from the application instance status JSON document.

avatar
Expert Contributor

@Shivaji Thank you.