Class BigtableIO.ReadChangeStream
- All Implemented Interfaces:
Serializable,HasDisplayData
- Enclosing class:
BigtableIO
- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPCollection<KV<ByteString, com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation>> Override this method to specify how thisPTransformshould be expanded on the givenInputT.voidvalidate(PipelineOptions options) Called before running the Pipeline to verify this transform is fully and correctly specified.withAppProfileId(String appProfileId) Returns a newBigtableIO.ReadChangeStreamthat will stream from the cluster specified by app profile id.withBacklogReplicationAdjustment(Duration adjustment) Returns a newBigtableIO.ReadChangeStreamthat overrides the replication delay adjustment duration with the provided duration.withChangeStreamName(String changeStreamName) Returns a newBigtableIO.ReadChangeStreamthat uses changeStreamName as prefix for the metadata table.withCreateOrUpdateMetadataTable(boolean shouldCreate) Returns a newBigtableIO.ReadChangeStreamthat, if set to true, will create or update metadata table before launching pipeline.withExistingPipelineOptions(BigtableIO.ExistingPipelineOptions existingPipelineOptions) Returns a newBigtableIO.ReadChangeStreamthat decides what to do if an existing pipeline exists with the same change stream name.withInstanceId(String instanceId) Returns a newBigtableIO.ReadChangeStreamthat will stream from the Cloud Bigtable instance indicated by given parameter, requireswithProjectId(java.lang.String)to be called to determine the project.withMetadataTableAppProfileId(String appProfileId) Returns a newBigtableIO.ReadChangeStreamthat will use the cluster specified by app profile id to store the metadata of the stream.withMetadataTableInstanceId(String instanceId) Returns a newBigtableIO.ReadChangeStreamthat will use the Cloud Bigtable instance indicated by given parameter to manage the metadata of the stream.withMetadataTableProjectId(String projectId) Returns a newBigtableIO.ReadChangeStreamthat will use the Cloud Bigtable project indicated by given parameter to manage the metadata of the stream.withMetadataTableTableId(String tableId) Returns a newBigtableIO.ReadChangeStreamthat will use specified table to store the metadata of the stream.Disables validation that the table being read and the metadata table exists, and that the app profile used is single cluster and single row transaction enabled.withProjectId(String projectId) Returns a newBigtableIO.ReadChangeStreamthat will stream from the Cloud Bigtable project indicated by given parameter, requireswithInstanceId(java.lang.String)to be called to determine the instance.withReadChangeStreamTimeout(Duration timeout) Returns a newBigtableIO.ReadChangeStreamthat overrides timeout for ReadChangeStream requests.withStartTime(Instant startTime) Returns a newBigtableIO.ReadChangeStreamthat will start streaming at the specified start time.withTableId(String tableId) Returns a newBigtableIO.ReadChangeStreamthat will stream from the specified table.Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate
-
Constructor Details
-
ReadChangeStream
public ReadChangeStream()
-
-
Method Details
-
withProjectId
Returns a newBigtableIO.ReadChangeStreamthat will stream from the Cloud Bigtable project indicated by given parameter, requireswithInstanceId(java.lang.String)to be called to determine the instance.Does not modify this object.
-
withInstanceId
Returns a newBigtableIO.ReadChangeStreamthat will stream from the Cloud Bigtable instance indicated by given parameter, requireswithProjectId(java.lang.String)to be called to determine the project.Does not modify this object.
-
withTableId
Returns a newBigtableIO.ReadChangeStreamthat will stream from the specified table.Does not modify this object.
-
withAppProfileId
Returns a newBigtableIO.ReadChangeStreamthat will stream from the cluster specified by app profile id.This must use single-cluster routing policy. If not setting a separate app profile for the metadata table with
withMetadataTableAppProfileId(java.lang.String), this app profile also needs to enable allow single-row transactions.Does not modify this object.
-
withStartTime
Returns a newBigtableIO.ReadChangeStreamthat will start streaming at the specified start time.Does not modify this object.
-
withChangeStreamName
Returns a newBigtableIO.ReadChangeStreamthat uses changeStreamName as prefix for the metadata table.Does not modify this object.
-
withExistingPipelineOptions
public BigtableIO.ReadChangeStream withExistingPipelineOptions(BigtableIO.ExistingPipelineOptions existingPipelineOptions) Returns a newBigtableIO.ReadChangeStreamthat decides what to do if an existing pipeline exists with the same change stream name.Does not modify this object.
-
withMetadataTableProjectId
Returns a newBigtableIO.ReadChangeStreamthat will use the Cloud Bigtable project indicated by given parameter to manage the metadata of the stream.Optional: defaults to value from withProjectId
Does not modify this object.
-
withMetadataTableInstanceId
Returns a newBigtableIO.ReadChangeStreamthat will use the Cloud Bigtable instance indicated by given parameter to manage the metadata of the stream.Optional: defaults to value from withInstanceId
Does not modify this object.
-
withMetadataTableTableId
Returns a newBigtableIO.ReadChangeStreamthat will use specified table to store the metadata of the stream.Optional: defaults to value from withTableId
Does not modify this object.
-
withMetadataTableAppProfileId
Returns a newBigtableIO.ReadChangeStreamthat will use the cluster specified by app profile id to store the metadata of the stream.Optional: defaults to value from withAppProfileId
This must use single-cluster routing policy with allow single-row transactions enabled.
Does not modify this object.
-
withCreateOrUpdateMetadataTable
Returns a newBigtableIO.ReadChangeStreamthat, if set to true, will create or update metadata table before launching pipeline. Otherwise, it is expected that a metadata table with correct schema exists.Optional: defaults to true
Does not modify this object.
-
withBacklogReplicationAdjustment
Returns a newBigtableIO.ReadChangeStreamthat overrides the replication delay adjustment duration with the provided duration.Backlog is calculated for each partition using watermarkLag * throughput. Replication delay holds back the watermark for each partition. This can cause the backlog to stay persistently above dataflow's downscaling threshold (10 seconds) even when a pipeline is caught up.
This adjusts the backlog downward to account for this. For unreplicated instances it can be set to zero to upscale as quickly as possible.
Optional: defaults to 30 seconds.
Does not modify this object.
-
withReadChangeStreamTimeout
Returns a newBigtableIO.ReadChangeStreamthat overrides timeout for ReadChangeStream requests.This is useful to override the default of 15s timeout if the checkpoint duration is longer than 15s. Setting this value to longer (to add some padding) than periodic checkpoint duration ensures that ReadChangeStream will stream until the next checkpoint is initiated.
Optional: defaults to 15 seconds.
Does not modify this object.
-
withoutValidation
Disables validation that the table being read and the metadata table exists, and that the app profile used is single cluster and single row transaction enabled. Set this option if the caller does not have additional Bigtable permissions to validate the configurations. NOTE this also disabled creating or updating the metadata table because that also requires additional permissions, essentially settingwithCreateOrUpdateMetadataTable(boolean)to false. -
validate
Description copied from class:PTransformCalled before running the Pipeline to verify this transform is fully and correctly specified.By default, does nothing.
- Overrides:
validatein classPTransform<PBegin,PCollection<KV<ByteString, com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation>>>
-
expand
public PCollection<KV<ByteString,com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation>> expand(PBegin input) Description copied from class:PTransformOverride this method to specify how thisPTransformshould be expanded on the givenInputT.NOTE: This method should not be called directly. Instead apply the
PTransformshould be applied to theInputTusing theapplymethod.Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
- Specified by:
expandin classPTransform<PBegin,PCollection<KV<ByteString, com.google.cloud.bigtable.data.v2.models.ChangeStreamMutation>>>
-