<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Yarn: Application Id - How is it generated ? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Yarn-Application-Id-How-is-it-generated/m-p/195652#M59297</link>
    <description>&lt;P&gt;Thank you Deepesh. &lt;/P&gt;</description>
    <pubDate>Wed, 12 Apr 2017 07:54:56 GMT</pubDate>
    <dc:creator>dineshc</dc:creator>
    <dc:date>2017-04-12T07:54:56Z</dc:date>
    <item>
      <title>Yarn: Application Id - How is it generated ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Yarn-Application-Id-How-is-it-generated/m-p/195649#M59294</link>
      <description>&lt;P&gt;I want to understand how the applicationId is generated when a job is submitted to Yarn.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 21:19:16 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Yarn-Application-Id-How-is-it-generated/m-p/195649#M59294</guid>
      <dc:creator>dineshc</dc:creator>
      <dc:date>2017-04-11T21:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: Yarn: Application Id - How is it generated ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Yarn-Application-Id-How-is-it-generated/m-p/195650#M59295</link>
      <description>&lt;P&gt;Application IDs are provided by Resource Manager to the client through the ApplicationSubmissionContext. More information can be found here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://hadoop.apache.org/docs/r2.7.2/hadoop-yarn/hadoop-yarn-site/WritingYarnApplications.html" target="_blank"&gt;https://hadoop.apache.org/docs/r2.7.2/hadoop-yarn/hadoop-yarn-site/WritingYarnApplications.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2017 00:03:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Yarn-Application-Id-How-is-it-generated/m-p/195650#M59295</guid>
      <dc:creator>deepesh1</dc:creator>
      <dc:date>2017-04-12T00:03:15Z</dc:date>
    </item>
    <item>
      <title>Re: Yarn: Application Id - How is it generated ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Yarn-Application-Id-How-is-it-generated/m-p/195651#M59296</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/13511/dineshchitlangia.html" nodeid="13511"&gt;@Dinesh Chitlangia&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Following code might give the idea on what you are looking out for:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/apache/hadoop/blob/release-2.8.0-RC0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationId.java#L53-L58" target="_blank"&gt;https://github.com/apache/hadoop/blob/release-2.8.0-RC0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationId.java#L53-L58&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;/**
 * &amp;lt;p&amp;gt;&amp;lt;code&amp;gt;ApplicationId&amp;lt;/code&amp;gt; represents the &amp;lt;em&amp;gt;globally unique&amp;lt;/em&amp;gt; 
 * identifier for an application.&amp;lt;/p&amp;gt;
 * 
 * &amp;lt;p&amp;gt;The globally unique nature of the identifier is achieved by using the 
 * &amp;lt;em&amp;gt;cluster timestamp&amp;lt;/em&amp;gt; i.e. start-time of the 
 * &amp;lt;code&amp;gt;ResourceManager&amp;lt;/code&amp;gt; along with a monotonically increasing counter
 * for the application.&amp;lt;/p&amp;gt;
 */

  @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;
  }&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;According to the API, The &lt;STRONG&gt;ApplicationId&lt;/STRONG&gt; 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&amp;lt;"/code&amp;gt;" along with a monotonically increasing counter for the application.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/apache/hadoop/blob/release-2.8.0-RC0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/Records.java#L35-L37" target="_blank"&gt;https://github.com/apache/hadoop/blob/release-2.8.0-RC0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/util/Records.java#L35-L37&lt;/A&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2017 00:21:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Yarn-Application-Id-How-is-it-generated/m-p/195651#M59296</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-04-12T00:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Yarn: Application Id - How is it generated ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Yarn-Application-Id-How-is-it-generated/m-p/195652#M59297</link>
      <description>&lt;P&gt;Thank you Deepesh. &lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2017 07:54:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Yarn-Application-Id-How-is-it-generated/m-p/195652#M59297</guid>
      <dc:creator>dineshc</dc:creator>
      <dc:date>2017-04-12T07:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Yarn: Application Id - How is it generated ?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Yarn-Application-Id-How-is-it-generated/m-p/195653#M59298</link>
      <description>&lt;P&gt;Perfect. Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Apr 2017 07:55:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Yarn-Application-Id-How-is-it-generated/m-p/195653#M59298</guid>
      <dc:creator>dineshc</dc:creator>
      <dc:date>2017-04-12T07:55:20Z</dc:date>
    </item>
  </channel>
</rss>

