127128129130131132133134135136137
c.stop().get(30, TimeUnit.SECONDS); } Assert.assertTrue(YarnTestUtils.waitForSize(apps, 0, 60)); } finally { runnerService.stopAndWait(); } // Sleep a bit before exiting. TimeUnit.SECONDS.sleep(2); }
6970717273747576777879
Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { controller.stopAndWait(); twillRunner.stopAndWait(); } }); try { Services.getCompletionFuture(controller).get();