Package io.deephaven.kafka.ingest
Class GenericRecordChunkAdapter
java.lang.Object
io.deephaven.kafka.ingest.MultiFieldChunkAdapter
io.deephaven.kafka.ingest.GenericRecordChunkAdapter
- All Implemented Interfaces:
KeyOrValueProcessor
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.
-
Method Summary
Modifier and TypeMethodDescriptionstatic GenericRecordChunkAdapter
make
(TableDefinition definition, IntFunction<ChunkType> chunkTypeForIndex, Map<String, String> columns, Pattern separator, org.apache.avro.Schema schema, boolean allowNulls) Create a GenericRecordChunkAdapter.Methods inherited from class io.deephaven.kafka.ingest.MultiFieldChunkAdapter
chunkOffsets, handleChunk
-
Method Details
-
make
public static GenericRecordChunkAdapter make(TableDefinition definition, IntFunction<ChunkType> chunkTypeForIndex, Map<String, String> columns, Pattern separator, org.apache.avro.Schema schema, boolean allowNulls) Create a GenericRecordChunkAdapter.- Parameters:
definition
- the definition of the output tablechunkTypeForIndex
- a function from column index to chunk typecolumns
- a map from Avro field paths to Deephaven column namesseparator
- separator for composite fields namesschema
- the Avro schema for our inputallowNulls
- true if null records should be allowed, if false then an ISE is thrown- Returns:
- a GenericRecordChunkAdapter for the given definition and column mapping
-