/** * Insert an PendingEnvelope into the pending envelope queue. * The function will be called in the run loop thread so no synchronization. * @param pendingEnvelope */ private void insertEnvelope(PendingEnvelope pendingEnvelope) { pendingEnvelopeQueue.add(pendingEnvelope); int queueSize = pendingEnvelopeQueue.size(); taskMetrics.pendingMessages().set(queueSize); log.trace("Insert envelope to task {} queue.", taskName); log.debug("Task {} pending envelope count is {} after insertion.", taskName, queueSize); }
/** * Insert an PendingEnvelope into the pending envelope queue. * The function will be called in the run loop thread so no synchronization. * @param pendingEnvelope */ private void insertEnvelope(PendingEnvelope pendingEnvelope) { pendingEnvelopeQueue.add(pendingEnvelope); int queueSize = pendingEnvelopeQueue.size(); taskMetrics.pendingMessages().set(queueSize); log.trace("Insert envelope to task {} queue.", taskName); log.debug("Task {} pending envelope count is {} after insertion.", taskName, queueSize); }
/** * Insert an PendingEnvelope into the pending envelope queue. * The function will be called in the run loop thread so no synchronization. * @param pendingEnvelope */ private void insertEnvelope(PendingEnvelope pendingEnvelope) { pendingEnvelopeQueue.add(pendingEnvelope); int queueSize = pendingEnvelopeQueue.size(); taskMetrics.pendingMessages().set(queueSize); log.trace("Insert envelope to task {} queue.", taskName); log.debug("Task {} pending envelope count is {} after insertion.", taskName, queueSize); }
private void startProcess() { int count = messagesInFlight.incrementAndGet(); taskMetrics.messagesInFlight().set(count); }
private void startProcess() { int count = messagesInFlight.incrementAndGet(); taskMetrics.messagesInFlight().set(count); }
private void startProcess() { int count = messagesInFlight.incrementAndGet(); taskMetrics.messagesInFlight().set(count); }
/** * Insert an PendingEnvelope into the pending envelope queue. * The function will be called in the run loop thread so no synchronization. * @param pendingEnvelope */ private void insertEnvelope(PendingEnvelope pendingEnvelope) { pendingEnvelopeQueue.add(pendingEnvelope); int queueSize = pendingEnvelopeQueue.size(); taskMetrics.pendingMessages().set(queueSize); log.trace("Insert envelope to task {} queue.", taskName); log.debug("Task {} pending envelope count is {} after insertion.", taskName, queueSize); }
/** * Insert an PendingEnvelope into the pending envelope queue. * The function will be called in the run loop thread so no synchronization. * @param pendingEnvelope */ private void insertEnvelope(PendingEnvelope pendingEnvelope) { pendingEnvelopeQueue.add(pendingEnvelope); int queueSize = pendingEnvelopeQueue.size(); taskMetrics.pendingMessages().set(queueSize); log.trace("Insert envelope to task {} queue.", taskName); log.debug("Task {} pending envelope count is {} after insertion.", taskName, queueSize); }
private void doneProcess() { int count = messagesInFlight.decrementAndGet(); taskMetrics.messagesInFlight().set(count); }
synchronized void update(long value) { histogram.update(value); Snapshot values = histogram.getSnapshot(); percentiles.forEach(x -> gauges.get(x).set(values.getValue(x / 100))); } }
public void updateGaugeValues(double percentile) { Snapshot values = histogram.getSnapshot(); gauges.get(percentile).set(values.getValue(percentile / 100)); }
void setAggregateTime(SystemStreamPartition systemStreamPartition, long time) { final Gauge<Long> aggregate = aggregates.computeIfAbsent(systemStreamPartition, ssp -> newGauge(String.format("%s-%s-aggr-watermark", ssp.getStream(), ssp.getPartition().getPartitionId()), 0L)); aggregate.set(time); } }
@Override public void onBecomingLeader() { LOG.info("ZkJobCoordinator::onBecomeLeader - I became the leader"); metrics.isLeader.set(true); zkUtils.subscribeToProcessorChange(new ProcessorChangeHandler(zkUtils)); debounceTimer.scheduleAfterDebounceTime(ON_PROCESSOR_CHANGE, debounceTimeMs, () -> { // actual actions to do are the same as onProcessorChange doOnProcessorChange(new ArrayList<>()); }); } }
@Override public void onBecomingLeader() { LOG.info("ZkJobCoordinator::onBecomeLeader - I became the leader"); metrics.isLeader.set(true); zkUtils.subscribeToProcessorChange(new ProcessorChangeHandler(zkUtils)); debounceTimer.scheduleAfterDebounceTime(ON_PROCESSOR_CHANGE, debounceTimeMs, () -> { // actual actions to do are the same as onProcessorChange doOnProcessorChange(new ArrayList<>()); }); } }
void setAggregateTime(SystemStreamPartition systemStreamPartition, long time) { final Gauge<Long> aggregate = aggregates.computeIfAbsent(systemStreamPartition, ssp -> newGauge(String.format("%s-%s-aggr-watermark", ssp.getStream(), ssp.getPartition().getPartitionId()), 0L)); aggregate.set(time); } }
void setAggregateTime(SystemStreamPartition systemStreamPartition, long time) { final Gauge<Long> aggregate = aggregates.computeIfAbsent(systemStreamPartition, ssp -> newGauge(String.format("%s-%s-aggr-watermark", ssp.getStream(), ssp.getPartition().getPartitionId()), 0L)); aggregate.set(time); } }
void setAggregateTime(SystemStreamPartition systemStreamPartition, long time) { final Gauge<Long> aggregate = aggregates.computeIfAbsent(systemStreamPartition, ssp -> newGauge(String.format("%s-%s-aggr-watermark", ssp.getStream(), ssp.getPartition().getPartitionId()), 0L)); aggregate.set(time); } }
@Override public void onBecomingLeader() { LOG.info("ZkJobCoordinator::onBecomeLeader - I became the leader"); metrics.isLeader.set(true); zkUtils.subscribeToProcessorChange(new ProcessorChangeHandler(zkUtils)); debounceTimer.scheduleAfterDebounceTime(ON_PROCESSOR_CHANGE, debounceTimeMs, () -> { // actual actions to do are the same as onProcessorChange doOnProcessorChange(new ArrayList<>()); }); } }
void setAggregateTime(SystemStreamPartition systemStreamPartition, long time) { final Gauge<Long> aggregate = aggregates.computeIfAbsent(systemStreamPartition, ssp -> newGauge(String.format("%s-%s-aggr-watermark", ssp.getStream(), ssp.getPartition().getPartitionId()), 0L)); aggregate.set(time); } }
@Override public void onBecomingLeader() { LOG.info("ZkJobCoordinator::onBecomeLeader - I became the leader"); metrics.isLeader.set(true); zkUtils.subscribeToProcessorChange(new ProcessorChangeHandler(zkUtils)); debounceTimer.scheduleAfterDebounceTime(ON_PROCESSOR_CHANGE, debounceTimeMs, () -> { // actual actions to do are the same as onProcessorChange doOnProcessorChange(new ArrayList<>()); }); } }