UnmanagedApplicationManager { public void shutDownConnections() { this.heartbeatHandler.shutdown(); this.rmProxyRelayer.shutdown(); } 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(timeout = 10000) public void testShutDownConnections() throws YarnException, IOException, InterruptedException { launchUAM(attemptId); registerApplicationMaster( RegisterApplicationMasterRequest.newInstance(null, 0, null), attemptId); uam.shutDownConnections(); while (uam.isHeartbeatThreadAlive()) { LOG.info("waiting for heartbeat thread to finish"); Thread.sleep(100); } }