@LifecycleStart public void start() { serverAnnouncer.announce(); fireChiefExecutor = Execs.multiThreaded(fireDepartments.size(), "chief-%d"); for (final FireDepartment fireDepartment : fireDepartments) { final DataSchema schema = fireDepartment.getDataSchema(); final FireChief chief = new FireChief(fireDepartment, conglomerate); chiefs.computeIfAbsent(schema.getDataSource(), k -> new HashMap<>()) .put(fireDepartment.getTuningConfig().getShardSpec().getPartitionNum(), chief); fireChiefExecutor.submit(chief); } }
@LifecycleStop public void stop() { stopping = true; try { if (fireChiefExecutor != null) { fireChiefExecutor.shutdownNow(); Preconditions.checkState( fireChiefExecutor.awaitTermination(10, TimeUnit.SECONDS), "persistExecutor not terminated" ); } } catch (InterruptedException e) { throw new ISE(e, "Failed to shutdown fireChiefExecutor during stop()"); } serverAnnouncer.unannounce(); }
toolbox.getDataSegmentServerAnnouncer().announce(); toolbox.getDruidNodeAnnouncer().announce(discoveryDruidNode); toolbox.getDataSegmentServerAnnouncer().unannounce();
final KafkaConsumer<byte[], byte[]> consumer = task.newConsumer() ) { toolbox.getDataSegmentServerAnnouncer().announce(); toolbox.getDruidNodeAnnouncer().announce(discoveryDruidNode); toolbox.getDataSegmentServerAnnouncer().unannounce();
toolbox.getDataSegmentServerAnnouncer().announce(); toolbox.getDruidNodeAnnouncer().announce(discoveryDruidNode); toolbox.getDataSegmentServerAnnouncer().unannounce(); toolbox.getDruidNodeAnnouncer().unannounce(discoveryDruidNode);
@LifecycleStop public void stop() { synchronized (startStopLock) { if (!started) { return; } log.info("Stopping..."); try { serverAnnouncer.unannounce(); } catch (Exception e) { throw Throwables.propagate(e); } finally { started = false; } log.info("Stopped."); } }
@LifecycleStart public void start() throws IOException { synchronized (startStopLock) { if (started) { return; } log.info("Starting..."); try { loadLocalCache(); serverAnnouncer.announce(); } catch (Exception e) { Throwables.propagateIfPossible(e, IOException.class); throw Throwables.propagate(e); } started = true; log.info("Started."); } }
toolbox.getDataSegmentServerAnnouncer().announce(); toolbox.getDruidNodeAnnouncer().announce(discoveryDruidNode); toolbox.getDataSegmentServerAnnouncer().unannounce(); toolbox.getDruidNodeAnnouncer().unannounce(discoveryDruidNode);
@After public void tearDown() throws Exception { batchServerInventoryView.stop(); filteredBatchServerInventoryView.stop(); serverAnnouncer.unannounce(); announcer.stop(); cf.close(); testingCluster.stop(); }
jsonMapper ); serverAnnouncer.announce();
toolbox.getDataSegmentServerAnnouncer().announce(); toolbox.getDruidNodeAnnouncer().announce(discoveryDruidNode); toolbox.getDataSegmentServerAnnouncer().unannounce(); toolbox.getDruidNodeAnnouncer().unannounce(discoveryDruidNode);
@LifecycleStop public void stop() { stopping = true; try { if (fireChiefExecutor != null) { fireChiefExecutor.shutdownNow(); Preconditions.checkState( fireChiefExecutor.awaitTermination(10, TimeUnit.SECONDS), "persistExecutor not terminated" ); } } catch (InterruptedException e) { throw new ISE(e, "Failed to shutdown fireChiefExecutor during stop()"); } serverAnnouncer.unannounce(); }
@LifecycleStart public void start() { serverAnnouncer.announce(); fireChiefExecutor = Execs.multiThreaded(fireDepartments.size(), "chief-%d"); for (final FireDepartment fireDepartment : fireDepartments) { final DataSchema schema = fireDepartment.getDataSchema(); final FireChief chief = new FireChief(fireDepartment, conglomerate); chiefs.computeIfAbsent(schema.getDataSource(), k -> new HashMap<>()) .put(fireDepartment.getTuningConfig().getShardSpec().getPartitionNum(), chief); fireChiefExecutor.submit(chief); } }
toolbox.getDataSegmentServerAnnouncer().announce(); toolbox.getDruidNodeAnnouncer().announce(discoveryDruidNode); toolbox.getDataSegmentServerAnnouncer().unannounce(); toolbox.getDruidNodeAnnouncer().unannounce(discoveryDruidNode);
@LifecycleStop public void stop() { synchronized (startStopLock) { if (!started) { return; } log.info("Stopping..."); try { serverAnnouncer.unannounce(); } catch (Exception e) { throw Throwables.propagate(e); } finally { started = false; } log.info("Stopped."); } }
@LifecycleStart public void start() throws IOException { synchronized (startStopLock) { if (started) { return; } log.info("Starting..."); try { loadLocalCache(); serverAnnouncer.announce(); } catch (Exception e) { Throwables.propagateIfPossible(e, IOException.class); throw Throwables.propagate(e); } started = true; log.info("Started."); } }