Abdul Rahman
Abdul Rahman

Reputation: 1384

Is it possible to get yarn application id using application name via yarn cli

I am running my spark application on yarn. Is it possible to get application id for my application, using application name through yarn cli?

Upvotes: 0

Views: 6364

Answers (2)

Rania ZYANE
Rania ZYANE

Reputation: 49

If you are looking for a specific application, you can use YARN ResourceManager REST API:

curl -s http://<RM_HOST>:<RM_PORT>/ws/v1/cluster/apps | jq '.apps.app[] | select(.name=="<APPLICATION_NAME>")'

Replace:

  • <RM_HOST> → ResourceManager hostname
  • <RM_PORT> → ResourceManager port (default: 8088)
  • <APPLICATION_NAME> → The name of your application

Upvotes: 0

Constantine
Constantine

Reputation: 1416

You have to use yarn application commands. Something like :

yarn application -list | grep your_app_name

For additional info, you can refer https://hadoop.apache.org/docs/r2.7.4/hadoop-yarn/hadoop-yarn-site/YarnCommands.html#application

Upvotes: 2

Related Questions