Junping Du commented on YARN-4131:

bq.  I'd actually leave out the waiting for the operation to complete: make it 
fully async and let caller wait if they want to.
The logic in YarnClientImpl should demonstrate the async way of consuming this 
API. It basically call killContainer() and looping to check return code (true 
means container is still active, so kill event get sent). Anything else to do, 
like: put some explicit async tag on this API?

bq.  is there any way to set the exit code? I'd like to signal pre-emption and 
out of memory events at some point.
Do you mean how we can know if container get killed successfully? Basically two 
ways, one is just like mentioned above, call killContainer() return false means 
container is gone; or call getContainerReport() or getContainers() in 
ApplicationBaseProtocol which return active containers only.

> Add API and CLI to kill container on given containerId
> ------------------------------------------------------
>                 Key: YARN-4131
>                 URL: https://issues.apache.org/jira/browse/YARN-4131
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: applications, client
>            Reporter: Junping Du
>            Assignee: Junping Du
>         Attachments: YARN-4131-demo-2.patch, YARN-4131-demo.patch
> Per YARN-3337, we need a handy tools to kill container in some scenarios.

This message was sent by Atlassian JIRA

Reply via email to