The request sent by clients to get a new {@link ApplicationId} forsubmitting an application.
Currently, this is empty.
202203204205206207208209210211212
} private ApplicationId submitAppAndGetAppId(String submitter, String queueName, boolean setupACLs) throws Exception { GetNewApplicationRequest newAppRequest = GetNewApplicationRequest.newInstance(); ApplicationClientProtocol submitterClient = getRMClientForUser(submitter); ApplicationId applicationId = submitterClient.getNewApplication(newAppRequest).getApplicationId();
737738739740741742743744745746
* Get a new application from the ASM * @return New Application * @throws YarnRemoteException */ private GetNewApplicationResponse getApplication() throws YarnRemoteException { GetNewApplicationRequest request = Records.newRecord(GetNewApplicationRequest.class); GetNewApplicationResponse response = applicationsManager.getNewApplication(request); LOG.info("Got new application id=" + response.getApplicationId()); return response; }
175176177178179180181182183
public String getFilesystemName() throws IOException, InterruptedException { return FileSystem.get(conf).getUri().toString(); } public JobID getNewJobID() throws IOException, InterruptedException { GetNewApplicationRequest request = recordFactory.newRecordInstance(GetNewApplicationRequest.class); applicationId = applicationsManager.getNewApplication(request).getApplicationId(); return TypeConverter.fromYarn(applicationId); }
104105106107108109110111112
} @Override public GetNewApplicationResponse getNewApplication() throws YarnRemoteException { GetNewApplicationRequest request = Records.newRecord(GetNewApplicationRequest.class); return rmClient.getNewApplication(request); }
117118119120121122123124125126127
// Now try talking to RMService using the delegation token clientRMWithDT = getClientRMProtocolWithDT(token, clientRMService.getBindAddress(), "loginuser1", conf); GetNewApplicationRequest request = Records.newRecord(GetNewApplicationRequest.class); try { clientRMWithDT.getNewApplication(request); } catch (UndeclaredThrowableException e) { fail("Unexpected exception" + e);
7576777879808182838485
String s = getUnixUserName(); getConf().set("bsp.user.name", s); LOG.debug("Retrieved username: " + s); } GetNewApplicationRequest request = Records .newRecord(GetNewApplicationRequest.class); GetNewApplicationResponse response = job.getApplicationsManager() .getNewApplication(request); id = response.getApplicationId(); LOG.debug("Got new ApplicationId=" + id);
120121122123124125126127128
super.serviceStop(); } private GetNewApplicationResponse getNewApplication() throws YarnException, IOException { GetNewApplicationRequest request = Records.newRecord(GetNewApplicationRequest.class); return rmClient.getNewApplication(request); }
126127128129130131132133134135136
// Now try talking to RMService using the delegation token clientRMWithDT = getClientRMProtocolWithDT(token, clientRMService.getBindAddress(), "loginuser1", conf); GetNewApplicationRequest request = Records.newRecord(GetNewApplicationRequest.class); try { clientRMWithDT.getNewApplication(request); } catch (IOException e) { fail("Unexpected exception" + e);
740741742743744745746747748749