Search code examples
hadoophadoop-yarn

How yarn application id is generated


I kick off a yarn application, it gives the id as application_1560618551799_4465795

But, I am supprised to find that 1560618551799 means Sun Jun 16 01:09:11 CST 2019,which is about 3 months ago.

I have thought that the timestamp in the id will fall into today, I would ask whether I am able to figure out when the application kicks off from id?

Thanks


Solution

  • Unfortunately, application start time can't be deduced from the application ID itself. Source code for the ApplicationId provides the following narrative:

    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. start-time of the ResourceManager along with a monotonically increasing counter for the application

    You'll probably need to getApplicationReport using YarnClient, and extract start time from there.