Package io.deephaven.kafka.ingest
Class JsonConsumerRecordToTableWriterAdapter
java.lang.Object
io.deephaven.kafka.ingest.JsonConsumerRecordToTableWriterAdapter
- All Implemented Interfaces:
ConsumerRecordToTableWriterAdapter
public class JsonConsumerRecordToTableWriterAdapter extends Object implements ConsumerRecordToTableWriterAdapter
Converts a consumer record containing JSON serialized objects to a Deephaven row.
After processing explicit mappings for fields; the JSON record is searched for exact matches of the key.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JsonConsumerRecordToTableWriterAdapter.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
-