@Override protected void wakeupConnections() { if (this.kafkaConsumer != null) { this.kafkaConsumer.wakeup(); } }
@Override protected void wakeupConnections() { if (this.kafkaConsumer != null) { this.kafkaConsumer.wakeup(); } }
@Override public void close() { if (!closed) { closed = true; consumer.wakeup(); } } }
@Override public void close() { LOG.trace("total read bytes [{}]", readBytes); if (consumer != null) { consumer.wakeup(); consumer.close(); } }
@Override public void close() { LOG.trace("total read bytes [{}]", readBytes); if (consumer != null) { consumer.wakeup(); consumer.close(); } }
private void decommissionConsumerAndRecords(ConsumerAndRecords c) { c.consumer.wakeup(); c.consumer.close(); }
consumer.wakeup(); } else {
consumer.wakeup(); } else {
/** * Shuts this thread down, waking up the thread gracefully if blocked (without Thread.interrupt() calls). */ public void shutdown() { running = false; // wake up all blocking calls on the queue unassignedPartitionsQueue.close(); // We cannot call close() on the KafkaConsumer, because it will actually throw // an exception if a concurrent call is in progress // this wakes up the consumer if it is blocked handing over records handover.wakeupProducer(); // this wakes up the consumer if it is blocked in a kafka poll synchronized (consumerReassignmentLock) { if (consumer != null) { consumer.wakeup(); } else { // the consumer is currently isolated for partition reassignment; // set this flag so that the wakeup state is restored once the reassignment is complete hasBufferedWakeup = true; } } }
/** * Shuts this thread down, waking up the thread gracefully if blocked (without Thread.interrupt() calls). */ public void shutdown() { running = false; // wake up all blocking calls on the queue unassignedPartitionsQueue.close(); // We cannot call close() on the KafkaConsumer, because it will actually throw // an exception if a concurrent call is in progress // this wakes up the consumer if it is blocked handing over records handover.wakeupProducer(); // this wakes up the consumer if it is blocked in a kafka poll synchronized (consumerReassignmentLock) { if (consumer != null) { consumer.wakeup(); } else { // the consumer is currently isolated for partition reassignment; // set this flag so that the wakeup state is restored once the reassignment is complete hasBufferedWakeup = true; } } }
@Override protected void doStop() throws FlumeException { if (consumer != null) { consumer.wakeup(); consumer.close(); } if (counter != null) { counter.stop(); } log.info("Kafka Source {} stopped. Metrics: {}", getName(), counter); }
this.consumer.wakeup(); hasBufferedWakeup = false;
this.consumer.wakeup(); hasBufferedWakeup = false;
client.poll(0, time.milliseconds()); consumer.wakeup();
public void shutdown() { closed.set(true); LOGGER.info("Closing offset consumer"); consumer.wakeup(); }
public void shutdown() { closed.set(true); LOGGER.info("Closing offset consumer"); consumer.wakeup(); }
public void run() { System.out.println("Starting exit..."); // Note that shutdownhook runs in a separate thread, so the only thing we can safely do to a consumer is wake it up movingAvg.consumer.wakeup(); try { mainThread.join(); } catch (InterruptedException e) { e.printStackTrace(); } } });
@Override public void close() { LOG.trace("total read bytes [{}]", readBytes); if (consumer != null) { consumer.wakeup(); consumer.close(); } }
@Override public void close() { LOG.trace("total read bytes [{}]", readBytes); if (consumer != null) { consumer.wakeup(); consumer.close(); } }
@Override protected void doStop() throws FlumeException { if (consumer != null) { consumer.wakeup(); consumer.close(); } if (counter != null) { counter.stop(); } log.info("Kafka Source {} stopped. Metrics: {}", getName(), counter); }