java.lang.Object
org.apache.beam.sdk.io.gcp.bigtable.changestreams.dao.ChangeStreamDao

@Internal public class ChangeStreamDao extends Object
Data access object to list and read stream partitions of a table.
  • Constructor Details

    • ChangeStreamDao

      public ChangeStreamDao(com.google.cloud.bigtable.data.v2.BigtableDataClient dataClient, String tableId)
  • Method Details

    • generateInitialChangeStreamPartitions

      public 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 Instant endTime, Duration heartbeatDuration) throws IOException
      Streams a partition.
      Parameters:
      partition - the partition to stream
      streamProgress - may contain a continuation token for the stream request
      endTime - time to end the stream, may be null
      heartbeatDuration - period between heartbeat messages
      Returns:
      stream of ReadChangeStreamResponse
      Throws:
      IOException - if the stream could not be started