UnmanagedApplicationManager { public void allocateAsync(AllocateRequest request, AsyncCallback<AllocateResponse> callback) throws YarnException { this.heartbeatHandler.allocateAsync(request, callback); if (this.userUgi == null) { if (this.connectionInitiated) { LOG.info("Unmanaged AM still not successfully launched/registered yet." + " Saving the allocate request and send later."); } else { throw new YarnException( "AllocateAsync should not be called before launchUAM"); } } } UnmanagedApplicationManager(Configuration conf, ApplicationId appId,
      String queueName, String submitter, String appNameSuffix,
      boolean keepContainersAcrossApplicationAttempts, String rmName); Token<AMRMTokenIdentifier> launchUAM(); void reAttachUAM(Token<AMRMTokenIdentifier> amrmToken); RegisterApplicationMasterResponse registerApplicationMaster(
      RegisterApplicationMasterRequest request); FinishApplicationMasterResponse finishApplicationMaster(
      FinishApplicationMasterRequest request); KillApplicationResponse forceKillApplication(); void allocateAsync(AllocateRequest request,
      AsyncCallback<AllocateResponse> callback); void shutDownConnections(); ApplicationId getAppId(); AMRMClientRelayer getAMRMClientRelayer(); @VisibleForTesting int getRequestQueueSize(); static final String APP_NAME; }
@Test(expected = Exception.class) public void testAllocateWithoutRegister() throws YarnException, IOException, InterruptedException { allocateAsync(AllocateRequest.newInstance(0, 0, null, null, null), callback, attemptId); }