Class MetadataSpannerConfigFactory
java.lang.Object
org.apache.beam.sdk.io.gcp.spanner.changestreams.MetadataSpannerConfigFactory
This class generates a SpannerConfig for the change stream metadata database by copying only the
necessary fields from the SpannerConfig of the primary database.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SpannerConfig
create
(SpannerConfig primaryConfig, String metadataInstanceId, String metadataDatabaseId) Generates a SpannerConfig that can be used to access the change stream metadata database by copying only the necessary fields from the given primary database SpannerConfig and setting the instance ID and database ID to the supplied metadata values.
-
Constructor Details
-
MetadataSpannerConfigFactory
public MetadataSpannerConfigFactory()
-
-
Method Details
-
create
public static SpannerConfig create(SpannerConfig primaryConfig, String metadataInstanceId, String metadataDatabaseId) Generates a SpannerConfig that can be used to access the change stream metadata database by copying only the necessary fields from the given primary database SpannerConfig and setting the instance ID and database ID to the supplied metadata values.- Parameters:
primaryConfig
- The SpannerConfig for accessing the primary databasemetadataInstanceId
- The instance ID of the metadata databasemetadataDatabaseId
- The database ID of the metadata database- Returns:
- the metadata SpannerConfig
-