Class GenericRecordChunkAdapter

java.lang.Object
io.deephaven.kafka.ingest.MultiFieldChunkAdapter
io.deephaven.kafka.ingest.GenericRecordChunkAdapter
All Implemented Interfaces:
KeyOrValueProcessor

public class GenericRecordChunkAdapter extends MultiFieldChunkAdapter
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 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 table
      chunkTypeForIndex - a function from column index to chunk type
      columns - a map from Avro field paths to Deephaven column names
      separator - separator for composite fields names
      schema - the Avro schema for our input
      allowNulls - true if null records should be allowed, if false then an ISE is thrown
      Returns:
      a GenericRecordChunkAdapter for the given definition and column mapping