In order to get a list of the ip addresses of emr slave nodes, one must run the following code:
yarn node -list 2>/dev/null \
| sed -n "s/^\(ip[^:]*\):.*/\1/p"
yarn node -list
happens to print off the ip of the master node to stderr
:
19/04/02 18:59:26 INFO client.RMProxy: Connecting to ResourceManager at ip-10-1-0-238.ec2.internal/10.1.0.238:8032
How would I modify the above code to get the private ip of the emr master node instead?