Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

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

avatar
New Member

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
Super Collaborator

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.