- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Yarn: Application Id - How is it generated ?
- Labels:
-
Apache YARN
Created ‎04-11-2017 02:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to understand how the applicationId is generated when a job is submitted to Yarn.
Created ‎04-11-2017 05:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Deepesh.
Created ‎04-11-2017 05:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perfect. Thank you.
