@Override public TwillSpecification configure() { // It is always present in cdap-default.xml final long noContainerTimeout = cConf.getLong(Constants.CFG_TWILL_NO_CONTAINER_TIMEOUT, Long.MAX_VALUE); TwillSpecification.Builder.RunnableSetter runnableSetter = addMessaging( addDatasetOpExecutor( addLogSaverService( addTransactionService( addMetricsProcessor ( addMetricsService( TwillSpecification.Builder.with().setName(NAME).withRunnable() ) ) ) ) ) ); if (cConf.getBoolean(Constants.Explore.EXPLORE_ENABLED)) { LOG.info("Adding explore runnable."); runnableSetter = addExploreService(runnableSetter); } else { LOG.info("Explore module disabled - will not launch explore runnable."); } return runnableSetter .withOrder() .begin(Constants.Service.MESSAGING_SERVICE, Constants.Service.TRANSACTION, Constants.Service.DATASET_EXECUTOR) .withEventHandler(new AbortOnTimeoutEventHandler(noContainerTimeout)) .build(); }