// Wait for contianers to be released.
delayedContainerManager.join(2000l);
synchronized (this) {
isStopped.set(true);
if (shouldUnregister.get()) {
AppFinalStatus status = appClientDelegate.getFinalAppStatus();
LOG.info("Unregistering application from RM"
+ ", exitStatus=" + status.exitStatus
+ ", exitMessage=" + status.exitMessage
+ ", trackingURL=" + status.postCompletionTrackingUrl);
amRmClient.unregisterApplicationMaster(status.exitStatus,