Support Questions

Find answers, ask questions, and share your expertise

How to change the Application-Name of a Application Master that is already started

avatar
New Contributor

Hi,

I have a requirement where I need to update the Application-Name of a Yarn  Application Master (AM) that I use to execute a  task.  The  same Yarn AM is reused  to run  multiple tasks and  and I need to update the Application-Name of the Yarn AM  based on the task I  run currently.

 

Example.:

 

If I am running  a  sort task, then  ' yarn application -list' command should show:

 

sh-4.4$ yarn application -list
23/06/23 00:34:24 INFO client.RMProxy: Connecting to ResourceManager at abc.def.hig.com/xx.xx.xx.xx:8032
Total number of applications (application-types: [], states: [SUBMITTED, ACCEPTED, RUNNING] and tags: []):2
Application-Id Application-Name Application-Type User Queue State Final-State Progress Tracking-URL
application_1686581388019_0752 sort_job1 YARN dsadm default RUNNING UNDEFINED 0% N/A
 
 
And later, If I am running  a  delete task using the same AM then  ' yarn application -list' command should show:
 
sh-4.4$ yarn application -list
23/06/23 00:34:24 INFO client.RMProxy: Connecting to ResourceManager at abc.def.hig.com/xx.xx.xx.xx:8032
Total number of applications (application-types: [], states: [SUBMITTED, ACCEPTED, RUNNING] and tags: []):2
Application-Id Application-Name Application-Type User Queue State Final-State Progress Tracking-URL
application_1686581388019_0752 delete_job1 YARN dsadm default RUNNING UNDEFINED 0% N/A
 
Is there a way to do this?
 
Thank you in advance!
 
Juan
2 REPLIES 2

avatar
Expert Contributor

Hi @juanmgeorge1 ,

You cant change the name of running application

avatar
Master Collaborator

Unfortunately, it is not possible to change the Application-Name of an already started Application Master in Apache Hadoop YARN. The Application-Name is set when the application is submitted and cannot be modified during runtime.

The Application-Name is typically specified as a parameter when submitting the application using the spark-submit command or the YARN REST API. Once the application is started, the Application-Name is fixed and cannot be changed.

If you need to change the Application-Name, you will need to stop the existing application and submit a new one with the desired name.