Package io.deephaven.kafka.ingest
Class ProtobufDiscovery
java.lang.Object
io.deephaven.kafka.ingest.SchemaDiscovery
io.deephaven.kafka.ingest.ProtobufDiscovery
public class ProtobufDiscovery extends SchemaDiscovery
-
Method Summary
Modifier and Type Method Description ProtobufDiscovery
columnPartition(String columnPartition)
Set the column partition name.ProtobufDiscovery
enumAsInt()
Identifies that ProtoBuf ENUM types should be stored by their Int value instead of their String nameProtobufDiscovery
enumAsInt(boolean enumAsInt)
Identifies schema-behavior for ProtoBuf ENUM types.org.jdom2.Element
generateDeephavenXml()
Generates a Deephaven schema XML element using the parameters set in this builder.ProtobufDiscovery
kafkaKeyColumn(String kafkaKeyColumn)
ProtobufDiscovery
kafkaOffsetColumn(String kafkaOffsetColumn)
Set the name of a column to use for the Kafka offset.ProtobufDiscovery
kafkaPartitionColumn(String kafkaPartitionColumn)
Set the name of a column to use for the Kafka partition.ProtobufDiscovery
kafkaTimestampColumn(String kafkaTimestampColumn)
Set the name of a column to use for the Kafka timestamp.ProtobufDiscovery
namespace(String namespace)
Set the resulting namespace.ProtobufDiscovery
tableName(String tableName)
Set the resulting table name.ProtobufDiscovery
unmappableBehavior(io.deephaven.kafka.ingest.SchemaDiscovery.UnmappableBehavior unmappableBehavior)
Set what should happen when an unmappable type is encountered.Methods inherited from class io.deephaven.kafka.ingest.SchemaDiscovery
avroFactory, avroFactory, avroFactory, generateDeephavenSchema, getColumnPartition, getKafkaKeyColumn, getKafkaOffsetColumn, getKafkaPartitionColumn, getKafkaTimestampColumn, getNamespace, getTableName, getUnmappableBehavior, protobufFactory, protobufFactory, protobufFactory
-
Method Details
-
enumAsInt
Identifies schema-behavior for ProtoBuf ENUM types. By default, the ENUM name is stored as a String; this option may be used to identify that the ENUM value should be stored as an Int- Parameters:
enumAsInt
- identifies if ENUMs should be stored as Int- Returns:
- this builder
-
enumAsInt
Identifies that ProtoBuf ENUM types should be stored by their Int value instead of their String name- Returns:
- this builder
-
namespace
Description copied from class:SchemaDiscovery
Set the resulting namespace.- Overrides:
namespace
in classSchemaDiscovery
- Parameters:
namespace
- the namespace of the result schema, if not set will be discovered from Avro schema- Returns:
- this builder
-
tableName
Description copied from class:SchemaDiscovery
Set the resulting table name.- Overrides:
tableName
in classSchemaDiscovery
- Parameters:
tableName
- the name of the result schema, if not set will be discovered from Avro schema- Returns:
- this builder
-
columnPartition
Description copied from class:SchemaDiscovery
Set the column partition name.- Overrides:
columnPartition
in classSchemaDiscovery
- Parameters:
columnPartition
- the name of the partitioning column- Returns:
- this builder
-
kafkaPartitionColumn
Description copied from class:SchemaDiscovery
Set the name of a column to use for the Kafka partition.- Overrides:
kafkaPartitionColumn
in classSchemaDiscovery
- Parameters:
kafkaPartitionColumn
- the name of the Kafka partition column- Returns:
- this builder
-
kafkaOffsetColumn
Description copied from class:SchemaDiscovery
Set the name of a column to use for the Kafka offset.- Overrides:
kafkaOffsetColumn
in classSchemaDiscovery
- Parameters:
kafkaOffsetColumn
- the name of the Kafka offset column- Returns:
- this builder
-
kafkaTimestampColumn
Description copied from class:SchemaDiscovery
Set the name of a column to use for the Kafka timestamp.- Overrides:
kafkaTimestampColumn
in classSchemaDiscovery
- Parameters:
kafkaTimestampColumn
- the name of the Kafka timestamp column- Returns:
- this builder
-
kafkaKeyColumn
- Overrides:
kafkaKeyColumn
in classSchemaDiscovery
-
unmappableBehavior
@NotNull public ProtobufDiscovery unmappableBehavior(@NotNull io.deephaven.kafka.ingest.SchemaDiscovery.UnmappableBehavior unmappableBehavior)Description copied from class:SchemaDiscovery
Set what should happen when an unmappable type is encountered.- Overrides:
unmappableBehavior
in classSchemaDiscovery
- Parameters:
unmappableBehavior
- the behavior on unmappable types- Returns:
- this builder
-
generateDeephavenXml
@NotNull public org.jdom2.Element generateDeephavenXml()Description copied from class:SchemaDiscovery
Generates a Deephaven schema XML element using the parameters set in this builder.- Specified by:
generateDeephavenXml
in classSchemaDiscovery
- Returns:
- a Deephaven schema XML element
-