I'd like to list the nodes on which the containers are running for a particular MR job.
I only have the application_id
.
Is it possible to do it with Hadoop REST API and/or through command line?
This can be done using the yarn
command.
yarn applicationattempt -list <Application Id>
to get an app attempt idyarn container -list <Application Attempt Id>
to get the container idsyarn container -status <Container Id>
to get the host for any particular container.If you want this in a bash script or want to get every host for an application with a large number of containers you will probably want to parse out the attempt/container id and host, but this is at least a start.
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