Class BeamKafkaTable
java.lang.Object
org.apache.beam.sdk.extensions.sql.meta.BaseBeamTable
org.apache.beam.sdk.extensions.sql.meta.SchemaBaseBeamTable
org.apache.beam.sdk.extensions.sql.meta.provider.kafka.BeamKafkaTable
- All Implemented Interfaces:
Serializable,BeamSqlTable
- Direct Known Subclasses:
BeamKafkaCSVTable,PayloadSerializerKafkaTable
BeamKafkaTable represent a Kafka topic, as source or target. Need to extend to convert
between BeamSqlRow and KV<byte[], byte[]>.- See Also:
-
Field Summary
FieldsFields inherited from class org.apache.beam.sdk.extensions.sql.meta.SchemaBaseBeamTable
schema -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBeamKafkaTable(Schema beamSchema) BeamKafkaTable(Schema beamSchema, String bootstrapServers, List<String> topics) BeamKafkaTable(Schema beamSchema, String bootstrapServers, List<String> topics, TimestampPolicyFactory timestampPolicyFactory) BeamKafkaTable(Schema beamSchema, List<TopicPartition> topicPartitions, String bootstrapServers) BeamKafkaTable(Schema beamSchema, List<TopicPartition> topicPartitions, String bootstrapServers, TimestampPolicyFactory timestampPolicyFactory) -
Method Summary
Modifier and TypeMethodDescriptionbuildIOReader(PBegin begin) create aPCollection<Row>from source.buildIOWriter(PCollection<Row> input) create aIO.write()instance to write to target.protected KafkaIO.Read<byte[], byte[]> protected abstract PTransform<PCollection<KafkaRecord<byte[], byte[]>>, PCollection<Row>> protected abstract PTransform<PCollection<Row>, PCollection<ProducerRecord<byte[], byte[]>>> getTableStatistics(PipelineOptions options) Estimates the number of rows or the rate for unbounded Tables.Whether this table is bounded (known to be finite) or unbounded (may or may not be finite).updateConsumerProperties(Map<String, Object> configUpdates) Methods inherited from class org.apache.beam.sdk.extensions.sql.meta.SchemaBaseBeamTable
getSchemaMethods inherited from class org.apache.beam.sdk.extensions.sql.meta.BaseBeamTable
buildIOReader, constructFilter, supportsProjects
-
Field Details
-
numberOfRecordsForRate
protected int numberOfRecordsForRate
-
-
Constructor Details
-
BeamKafkaTable
-
BeamKafkaTable
-
BeamKafkaTable
public BeamKafkaTable(Schema beamSchema, String bootstrapServers, List<String> topics, TimestampPolicyFactory timestampPolicyFactory) -
BeamKafkaTable
public BeamKafkaTable(Schema beamSchema, List<TopicPartition> topicPartitions, String bootstrapServers) -
BeamKafkaTable
public BeamKafkaTable(Schema beamSchema, List<TopicPartition> topicPartitions, String bootstrapServers, TimestampPolicyFactory timestampPolicyFactory)
-
-
Method Details
-
updateConsumerProperties
-
isBounded
Description copied from interface:BeamSqlTableWhether this table is bounded (known to be finite) or unbounded (may or may not be finite). -
getPTransformForInput
protected abstract PTransform<PCollection<KafkaRecord<byte[],byte[]>>, getPTransformForInput()PCollection<Row>> -
getPTransformForOutput
protected abstract PTransform<PCollection<Row>,PCollection<ProducerRecord<byte[], getPTransformForOutput()byte[]>>> -
buildIOReader
Description copied from interface:BeamSqlTablecreate aPCollection<Row>from source. -
createKafkaRead
-
buildIOWriter
Description copied from interface:BeamSqlTablecreate aIO.write()instance to write to target. -
getBootstrapServers
-
getTopics
-
getConfigUpdates
-
getTimestampPolicyFactory
-
getTableStatistics
Description copied from interface:BeamSqlTableEstimates the number of rows or the rate for unbounded Tables. If it is not possible to estimate the row count or rate it will return BeamTableStatistics.BOUNDED_UNKNOWN.- Specified by:
getTableStatisticsin interfaceBeamSqlTable- Overrides:
getTableStatisticsin classBaseBeamTable
-