Java Code Examples for org.apache.hadoop.yarn.server.api.ApplicationInitializationContext#getApplicationId()
The following examples show how to use
org.apache.hadoop.yarn.server.api.ApplicationInitializationContext#getApplicationId() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ShuffleHandler.java From hadoop with Apache License 2.0 | 6 votes |
@Override public void initializeApplication(ApplicationInitializationContext context) { String user = context.getUser(); ApplicationId appId = context.getApplicationId(); ByteBuffer secret = context.getApplicationDataForService(); // TODO these bytes should be versioned try { Token<JobTokenIdentifier> jt = deserializeServiceData(secret); // TODO: Once SHuffle is out of NM, this can use MR APIs JobID jobId = new JobID(Long.toString(appId.getClusterTimestamp()), appId.getId()); recordJobShuffleInfo(jobId, user, jt); } catch (IOException e) { LOG.error("Error during initApp", e); // TODO add API to AuxiliaryServices to report failures } }
Example 2
Source File: ShuffleHandler.java From big-c with Apache License 2.0 | 6 votes |
@Override public void initializeApplication(ApplicationInitializationContext context) { String user = context.getUser(); ApplicationId appId = context.getApplicationId(); ByteBuffer secret = context.getApplicationDataForService(); // TODO these bytes should be versioned try { Token<JobTokenIdentifier> jt = deserializeServiceData(secret); // TODO: Once SHuffle is out of NM, this can use MR APIs JobID jobId = new JobID(Long.toString(appId.getClusterTimestamp()), appId.getId()); recordJobShuffleInfo(jobId, user, jt); } catch (IOException e) { LOG.error("Error during initApp", e); // TODO add API to AuxiliaryServices to report failures } }
Example 3
Source File: ShuffleHandler.java From tez with Apache License 2.0 | 6 votes |
@Override public void initializeApplication(ApplicationInitializationContext context) { String user = context.getUser(); ApplicationId appId = context.getApplicationId(); ByteBuffer secret = context.getApplicationDataForService(); // TODO these bytes should be versioned try { Token<JobTokenIdentifier> jt = deserializeServiceData(secret); // TODO: Once SHuffle is out of NM, this can use MR APIs JobID jobId = new JobID(Long.toString(appId.getClusterTimestamp()), appId.getId()); recordJobShuffleInfo(jobId, user, jt); } catch (IOException e) { LOG.error("Error during initApp", e); // TODO add API to AuxiliaryServices to report failures } }
Example 4
Source File: TajoPullServerService.java From tajo with Apache License 2.0 | 5 votes |
@Override public void initializeApplication(ApplicationInitializationContext context) { // TODO these bytes should be versioned // TODO: Once SHuffle is out of NM, this can use MR APIs String user = context.getUser(); ApplicationId appId = context.getApplicationId(); // ByteBuffer secret = context.getApplicationDataForService(); userRsrc.put(appId.toString(), user); }
Example 5
Source File: PullServerAuxService.java From incubator-tajo with Apache License 2.0 | 5 votes |
@Override public void initializeApplication(ApplicationInitializationContext appInitContext) { // TODO these bytes should be versioned // TODO: Once SHuffle is out of NM, this can use MR APIs this.appId = appInitContext.getApplicationId(); this.queryId = TajoIdUtils.parseQueryId(appId.toString()); this.userName = appInitContext.getUser(); userRsrc.put(this.appId.toString(), this.userName); }