Reputation: 797
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?
Upvotes: 6
Views: 5934
Reputation: 2516
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.
Upvotes: 10
Reputation: 8937
You can find them using Resource manager UI. Find your application by ID among the existing applications and click on the link with ID you have. You will see your application stats. Fint the tracking URL and click on the link 'History'. There you'll be able to find the tasks in your map operation and recude optration. You can open each task and see the information, to which node it was assigned for, nubmer of attempts, logs for each task and attempts and lots of other usefull information.
For getting the information about the container status from command line you can use yarn container -status command from bash
Upvotes: 0