Example usage for org.apache.hadoop.yarn.api.records ApplicationId appIdStrPrefix

List of usage examples for org.apache.hadoop.yarn.api.records ApplicationId appIdStrPrefix

Introduction

In this page you can find the example usage for org.apache.hadoop.yarn.api.records ApplicationId appIdStrPrefix.

Prototype

String appIdStrPrefix

To view the source code for org.apache.hadoop.yarn.api.records ApplicationId appIdStrPrefix.

Click Source Link

Usage

From source file:org.elasticsearch.hadoop.yarn.util.YarnUtils.java

License:Apache License

public static ApplicationId createAppIdFrom(String appId) {
    appId = appId.substring(ApplicationId.appIdStrPrefix.length());
    int delimiter = appId.indexOf("-");
    return ApplicationId.newInstance(Long.parseLong(appId.substring(0, delimiter)),
            Integer.parseInt(appId.substring(delimiter + 1)));
}