Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

list of nodes for an application id from command line

avatar
Rising Star

Is it possible to list the nodes for an application id from command line?

ie i want to see all the nodes involved in a job - from the command line.

Appreciate the feedback.

1 ACCEPTED SOLUTION

avatar
Expert Contributor

Not sure about direct command.

But you can use some shell script.

Script:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------

for a in `yarn applicationattempt -list application_1522234336469_0002|grep appattempt|awk '{print $1}'`

do

echo "Attempt $a nodes"

for b in `yarn container -list $a|grep 'container_'| awk '{print $15}'`

do

echo "Node: $b"

done

done

-----------------------------------------------------------------------------------------------------------------------------------------------------------------

View solution in original post

4 REPLIES 4

avatar
Expert Contributor

Not sure about direct command.

But you can use some shell script.

Script:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------

for a in `yarn applicationattempt -list application_1522234336469_0002|grep appattempt|awk '{print $1}'`

do

echo "Attempt $a nodes"

for b in `yarn container -list $a|grep 'container_'| awk '{print $15}'`

do

echo "Node: $b"

done

done

-----------------------------------------------------------------------------------------------------------------------------------------------------------------

avatar
Rising Star

that was cool. thanks!!!

avatar
Expert Contributor

Hi @n c,

Could you please accept answer if you find it useful?

-Shubham

avatar
Expert Contributor

@n cIf above information helped you, Could you please accept answer?