Created 04-11-2017 02:19 PM
I want to understand how the applicationId is generated when a job is submitted to Yarn.
Created 04-11-2017 05:21 PM
Following code might give the idea on what you are looking out for:
/** * <p><code>ApplicationId</code> represents the <em>globally unique</em> * identifier for an application.</p> * * <p>The globally unique nature of the identifier is achieved by using the * <em>cluster timestamp</em> i.e. start-time of the * <code>ResourceManager</code> along with a monotonically increasing counter * for the application.</p> */ @Public @Unstable public static ApplicationId newInstance(long clusterTimestamp, int id) { ApplicationId appId = Records.newRecord(ApplicationId.class); appId.setClusterTimestamp(clusterTimestamp); appId.setId(id); appId.build(); return appId; }
.
According to the API, The ApplicationId represents the globally unique identifier for an application. The globally unique nature of the identifier is achieved by using the "cluster timestamp" i.e. The start-time of the "ResourceManager<"/code>" along with a monotonically increasing counter for the application.
.
Created 04-11-2017 05:03 PM
Application IDs are provided by Resource Manager to the client through the ApplicationSubmissionContext. More information can be found here:
https://hadoop.apache.org/docs/r2.7.2/hadoop-yarn/hadoop-yarn-site/WritingYarnApplications.html
Created 04-12-2017 12:54 AM
Thank you Deepesh.
Created 04-11-2017 05:21 PM
Following code might give the idea on what you are looking out for:
/** * <p><code>ApplicationId</code> represents the <em>globally unique</em> * identifier for an application.</p> * * <p>The globally unique nature of the identifier is achieved by using the * <em>cluster timestamp</em> i.e. start-time of the * <code>ResourceManager</code> along with a monotonically increasing counter * for the application.</p> */ @Public @Unstable public static ApplicationId newInstance(long clusterTimestamp, int id) { ApplicationId appId = Records.newRecord(ApplicationId.class); appId.setClusterTimestamp(clusterTimestamp); appId.setId(id); appId.build(); return appId; }
.
According to the API, The ApplicationId represents the globally unique identifier for an application. The globally unique nature of the identifier is achieved by using the "cluster timestamp" i.e. The start-time of the "ResourceManager<"/code>" along with a monotonically increasing counter for the application.
.
Created 04-12-2017 12:55 AM
Perfect. Thank you.