/** * Reloads the bootstrap config. */ public void reload() { config = bootstrapConfigProvider.getConfig(); }
/** * Reloads the bootstrap config. */ public void reload() { config = bootstrapConfigProvider.getConfig(); }
@Override protected void startUp() { LOG.info("Starting {}", getClass().getSimpleName()); config = bootstrapConfigProvider.getConfig(); executorService = Executors.newSingleThreadExecutor(Threads.createDaemonThreadFactory("bootstrap-service")); executorService.execute(() -> { try { if (isBootstrappedWithRetries()) { // if the system is already bootstrapped, skip any bootstrap step that is supposed to only run once bootstrap(step -> step.getRunCondition() == BootstrapStep.RunCondition.ONCE); } else { bootstrap(); } } catch (InterruptedException e) { LOG.info("Bootstrapping could not complete due to interruption. It will be re-run the next time CDAP starts."); } }); LOG.info("Started {}", getClass().getSimpleName()); }
@Override protected void startUp() { LOG.info("Starting {}", getClass().getSimpleName()); config = bootstrapConfigProvider.getConfig(); executorService = Executors.newSingleThreadExecutor(Threads.createDaemonThreadFactory("bootstrap-service")); executorService.execute(() -> { try { if (isBootstrappedWithRetries()) { // if the system is already bootstrapped, skip any bootstrap step that is supposed to only run once bootstrap(step -> step.getRunCondition() == BootstrapStep.RunCondition.ONCE); } else { bootstrap(); } } catch (InterruptedException e) { LOG.info("Bootstrapping could not complete due to interruption. It will be re-run the next time CDAP starts."); } }); LOG.info("Started {}", getClass().getSimpleName()); }