Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

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

Solved Go to solution
Highlighted

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

Expert Contributor
 
1 ACCEPTED SOLUTION

Accepted Solutions

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

@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.

6 REPLIES 6

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

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

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

Expert Contributor

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

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

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.

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

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

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

@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.

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

Expert Contributor

@Shivaji Thank you.

Don't have an account?
Coming from Hortonworks? Activate your account here