Thread.sleep(heartBeatIntervalMs);
// We always send 50% progress.
AllocateResponse allocResponse = client.allocate(0.5f);
AMCommand am_command = allocResponse.getAMCommand();
if (am_command!=null &&
(am_command == AMCommand.AM_SHUTDOWN || am_command==AMCommand.AM_RESYNC)) {
LOG.info("Got AM_SHUTDOWN or AM_RESYNC from the RM");
_handler.stop();
System.exit(0);