List of usage examples for org.apache.hadoop.yarn.server.api ApplicationInitializationContext getUser
public String getUser()
From source file:com.mellanox.hadoop.mapred.UdaShuffleHandler.java
License:Apache License
@Override public void initializeApplication(ApplicationInitializationContext context) { LOG.info("starting initializeApplication of UdaShuffleHandler"); String user = context.getUser(); ApplicationId appId = context.getApplicationId(); JobID jobId = new JobID(Long.toString(appId.getClusterTimestamp()), appId.getId()); // rdmaChannel = new UdaPluginSH(conf, user, jobId); rdmaChannel.addJob(user, jobId);/*from w w w.ja v a 2 s. c o m*/ LOG.info("finished initializeApplication of UdaShuffleHandler"); }
From source file:org.apache.tajo.pullserver.PullServerAuxService.java
License:Apache License
@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); }
From source file:org.apache.tajo.yarn.TajoPullServerService.java
License:Apache License
@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); }
From source file:org.apache.tez.auxservices.ShuffleHandler.java
License:Apache License
@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 {// www . jav a 2 s . com 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 } }
From source file:org.apache.tez.engine.common.shuffle.server.ShuffleHandler.java
License:Apache License
@Override public void initializeApplication(ApplicationInitializationContext initAppContext) { // TODO these bytes should be versioned try {// w w w .ja v a2s . c om String user = initAppContext.getUser(); ApplicationId appId = initAppContext.getApplicationId(); ByteBuffer secret = initAppContext.getApplicationDataForService(); Token<JobTokenIdentifier> jt = deserializeServiceData(secret); // TODO: Once SHuffle is out of NM, this can use MR APIs userRsrc.put(appId.toString(), user); LOG.info("Added token for " + appId.toString()); secretManager.addTokenForJob(appId.toString(), jt); } catch (IOException e) { LOG.error("Error during initApp", e); // TODO add API to AuxiliaryServices to report failures } }