Package io.deephaven.kafka.ingest
Class GenericRecordConsumerRecordToTableWriterAdapter
java.lang.Object
io.deephaven.kafka.ingest.GenericRecordConsumerRecordToTableWriterAdapter
- All Implemented Interfaces:
ConsumerRecordToTableWriterAdapter
public class GenericRecordConsumerRecordToTableWriterAdapter extends Object implements ConsumerRecordToTableWriterAdapter
Convert an Avro
GenericRecord
to Deephaven rows.
Each GenericRecord produces a single row of output, according to the maps of Table column names to Avro field names
for the keys and values.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GenericRecordConsumerRecordToTableWriterAdapter.Builder
A builder to map key and value fields to table columns. -
Method Summary
Modifier and Type Method Description void
consumeRecord(org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record)
Consume a Kafka record, producing zero or more rows in the output.
-
Method Details
-
consumeRecord
public void consumeRecord(org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record) throws IOExceptionDescription copied from interface:ConsumerRecordToTableWriterAdapter
Consume a Kafka record, producing zero or more rows in the output.- Specified by:
consumeRecord
in interfaceConsumerRecordToTableWriterAdapter
- Parameters:
record
- the record received fromKafkaConsumer.poll(Duration)
.- Throws:
IOException
- if there was an error writing to the output table
-