Class MessageIterator
java.lang.Object
org.apache.drill.exec.store.kafka.MessageIterator
- All Implemented Interfaces:
AutoCloseable
,Iterator<org.apache.kafka.clients.consumer.ConsumerRecord<byte[],
byte[]>>
public class MessageIterator
extends Object
implements Iterator<org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]>>, AutoCloseable
-
Constructor Summary
ConstructorDescriptionMessageIterator
(org.apache.kafka.clients.consumer.KafkaConsumer<byte[], byte[]> kafkaConsumer, KafkaPartitionScanSpec subScanSpec, long kafkaPollTimeOut) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
MessageIterator
public MessageIterator(org.apache.kafka.clients.consumer.KafkaConsumer<byte[], byte[]> kafkaConsumer, KafkaPartitionScanSpec subScanSpec, long kafkaPollTimeOut)
-
-
Method Details
-
remove
public void remove() -
hasNext
public boolean hasNext() -
getTotalFetchTime
public long getTotalFetchTime()Returns total fetch time of the messages from topic. Only applicable if debug log level is enabled.- Returns:
- calculated total fetch time if debug log level is enabled, 0 otherwise
-
next
public org.apache.kafka.clients.consumer.ConsumerRecord<byte[],byte[]> next() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-