public abstract class BeamKafkaTable extends BaseBeamTable implements java.io.Serializable
BeamKafkaTable represent a Kafka topic, as source or target. Need to
extend to convert between BeamSqlRow and KV<byte[], byte[]>.rowType| Modifier | Constructor and Description |
|---|---|
protected |
BeamKafkaTable(RowType beamRowType) |
|
BeamKafkaTable(RowType beamRowType,
java.util.List<TopicPartition> topicPartitions,
java.lang.String bootstrapServers) |
|
BeamKafkaTable(RowType beamRowType,
java.lang.String bootstrapServers,
java.util.List<java.lang.String> topics) |
| Modifier and Type | Method and Description |
|---|---|
PCollection<Row> |
buildIOReader(Pipeline pipeline)
create a
PCollection<BeamSqlRow> from source. |
PTransform<? super PCollection<Row>,PDone> |
buildIOWriter()
create a
IO.write() instance to write to target. |
java.lang.String |
getBootstrapServers() |
abstract PTransform<PCollection<KV<byte[],byte[]>>,PCollection<Row>> |
getPTransformForInput() |
abstract PTransform<PCollection<Row>,PCollection<KV<byte[],byte[]>>> |
getPTransformForOutput() |
BeamIOType |
getSourceType()
In Beam SQL, there's no difference between a batch query and a streaming
query.
|
java.util.List<java.lang.String> |
getTopics() |
BeamKafkaTable |
updateConsumerProperties(java.util.Map<java.lang.String,java.lang.Object> configUpdates) |
getRowTypeprotected BeamKafkaTable(RowType beamRowType)
public BeamKafkaTable(RowType beamRowType, java.lang.String bootstrapServers, java.util.List<java.lang.String> topics)
public BeamKafkaTable(RowType beamRowType, java.util.List<TopicPartition> topicPartitions, java.lang.String bootstrapServers)
public BeamKafkaTable updateConsumerProperties(java.util.Map<java.lang.String,java.lang.Object> configUpdates)
public BeamIOType getSourceType()
BeamSqlTableBeamIOType is used to validate the sources.getSourceType in interface BeamSqlTablepublic abstract PTransform<PCollection<KV<byte[],byte[]>>,PCollection<Row>> getPTransformForInput()
public abstract PTransform<PCollection<Row>,PCollection<KV<byte[],byte[]>>> getPTransformForOutput()
public PCollection<Row> buildIOReader(Pipeline pipeline)
BeamSqlTablePCollection<BeamSqlRow> from source.buildIOReader in interface BeamSqlTablepublic PTransform<? super PCollection<Row>,PDone> buildIOWriter()
BeamSqlTableIO.write() instance to write to target.buildIOWriter in interface BeamSqlTablepublic java.lang.String getBootstrapServers()
public java.util.List<java.lang.String> getTopics()