java.lang.Object
org.apache.beam.sdk.io.gcp.bigtable.changestreams.model.NewPartition
All Implemented Interfaces:
Serializable

@Internal public class NewPartition extends Object implements Serializable
Represent new partition as a result of splits and merges.

Parent partitions stop streaming and record their change stream continuation tokens. The tokens are collected to continue the stream from the new partition.

See Also:
  • Constructor Details

    • NewPartition

      public NewPartition(com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange partition, List<com.google.cloud.bigtable.data.v2.models.ChangeStreamContinuationToken> changeStreamContinuationTokens, Instant lowWatermark, Instant lastUpdated)
    • NewPartition

      public NewPartition(com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange partition, List<com.google.cloud.bigtable.data.v2.models.ChangeStreamContinuationToken> changeStreamContinuationTokens, Instant lowWatermark)
  • Method Details

    • getPartition

      public com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange getPartition()
    • getChangeStreamContinuationTokens

      public List<com.google.cloud.bigtable.data.v2.models.ChangeStreamContinuationToken> getChangeStreamContinuationTokens()
    • getLowWatermark

      public Instant getLowWatermark()
    • getParentPartitions

      public List<com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange> getParentPartitions()
    • getLastUpdated

      public Instant getLastUpdated()
    • getSingleTokenNewPartition

      @Nullable public NewPartition getSingleTokenNewPartition(com.google.cloud.bigtable.data.v2.models.Range.ByteStringRange parentPartition)
      Return a new NewPartition that only contains one token that matches the parentPartition. If the parentPartition does not exist, return null.
      Parameters:
      parentPartition - to parent partition to find within the tokens.
      Returns:
      a NewPartition with one token with parentPartition. null otherwise.
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object