Class JsonMessageReader
java.lang.Object
org.apache.drill.exec.store.kafka.decoders.JsonMessageReader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,MessageReader
MessageReader class which will convert ConsumerRecord into JSON and writes to
VectorContainerWriter of JsonReader
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
endBatch()
org.apache.kafka.clients.consumer.KafkaConsumer<byte[],
byte[]> getConsumer
(KafkaStoragePlugin plugin) void
init
(SchemaNegotiator negotiator, ReadOptions readOptions, KafkaStoragePlugin plugin) void
readMessage
(org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> record) toString()
-
Constructor Details
-
JsonMessageReader
public JsonMessageReader()
-
-
Method Details
-
init
- Specified by:
init
in interfaceMessageReader
-
readMessage
public void readMessage(org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> record) - Specified by:
readMessage
in interfaceMessageReader
-
getResultSetLoader
- Specified by:
getResultSetLoader
in interfaceMessageReader
-
getConsumer
public org.apache.kafka.clients.consumer.KafkaConsumer<byte[],byte[]> getConsumer(KafkaStoragePlugin plugin) - Specified by:
getConsumer
in interfaceMessageReader
-
endBatch
public boolean endBatch()- Specified by:
endBatch
in interfaceMessageReader
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
toString
-