Class ChangeStreamDao
- java.lang.Object
-
- org.apache.beam.sdk.io.gcp.bigtable.changestreams.dao.ChangeStreamDao
-
@Internal public class ChangeStreamDao extends java.lang.ObjectData access object to list and read stream partitions of a table.
-
-
Constructor Summary
Constructors Constructor Description ChangeStreamDao(com.google.cloud.bigtable.data.v2.BigtableDataClient dataClient, java.lang.String tableId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange>generateInitialChangeStreamPartitions()Returns the result from GenerateInitialChangeStreamPartitions API.com.google.api.gax.rpc.ServerStream<com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord>readChangeStreamPartition(PartitionRecord partition, StreamProgress streamProgress, org.joda.time.Instant endTime, org.joda.time.Duration heartbeatDuration)Streams a partition.
-
-
-
Method Detail
-
generateInitialChangeStreamPartitions
public java.util.List<com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange> generateInitialChangeStreamPartitions()
Returns the result from GenerateInitialChangeStreamPartitions API.- Returns:
- list of StreamPartition
-
readChangeStreamPartition
public com.google.api.gax.rpc.ServerStream<com.google.cloud.bigtable.data.v2.models.ChangeStreamRecord> readChangeStreamPartition(PartitionRecord partition, StreamProgress streamProgress, @Nullable org.joda.time.Instant endTime, org.joda.time.Duration heartbeatDuration) throws java.io.IOException
Streams a partition.- Parameters:
partition- the partition to streamstreamProgress- may contain a continuation token for the stream requestendTime- time to end the stream, may be nullheartbeatDuration- period between heartbeat messages- Returns:
- stream of ReadChangeStreamResponse
- Throws:
java.io.IOException- if the stream could not be started
-
-