PerNodeTimelineCollectorsAuxService extends AuxiliaryService { @VisibleForTesting public static PerNodeTimelineCollectorsAuxService launchServer(String[] args, NodeTimelineCollectorManager collectorManager, Configuration conf) { Thread .setDefaultUncaughtExceptionHandler(new YarnUncaughtExceptionHandler()); StringUtils.startupShutdownMessage( PerNodeTimelineCollectorsAuxService.class, args, LOG); PerNodeTimelineCollectorsAuxService auxService = null; try { auxService = collectorManager == null ? new PerNodeTimelineCollectorsAuxService( new NodeTimelineCollectorManager(false)) : new PerNodeTimelineCollectorsAuxService(collectorManager); ShutdownHookManager.get().addShutdownHook(new ShutdownHook(auxService), SHUTDOWN_HOOK_PRIORITY); auxService.init(conf); auxService.start(); } catch (Throwable t) { LOG.error("Error starting PerNodeTimelineCollectorServer", t); ExitUtil.terminate(-1, "Error starting PerNodeTimelineCollectorServer"); } return auxService; } PerNodeTimelineCollectorsAuxService(); @VisibleForTesting  PerNodeTimelineCollectorsAuxService(
      NodeTimelineCollectorManager collectorsManager); boolean addApplicationIfAbsent(ApplicationId appId, String user); boolean removeApplication(ApplicationId appId); @Override void initializeContainer(ContainerInitializationContext context); @Override void stopContainer(ContainerTerminationContext context); @Override void initializeApplication(ApplicationInitializationContext context); @Override void stopApplication(ApplicationTerminationContext context); @Override ByteBuffer getMetaData(); @VisibleForTesting static PerNodeTimelineCollectorsAuxService launchServer(String[] args, NodeTimelineCollectorManager collectorManager,
      Configuration conf); static void main(String[] args);  }
@Test(timeout = 60000) public void testLaunch() throws Exception { ExitUtil.disableSystemExit(); try { auxService = PerNodeTimelineCollectorsAuxService.launchServer(new String[0], createCollectorManager(), conf); } catch (ExitUtil.ExitException e) { assertEquals(0, e.status); ExitUtil.resetFirstExitException(); fail(); } }