Class MetadataSpannerConfigFactory

java.lang.Object
org.apache.beam.sdk.io.gcp.spanner.changestreams.MetadataSpannerConfigFactory

public class MetadataSpannerConfigFactory extends Object
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 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 database
      metadataInstanceId - The instance ID of the metadata database
      metadataDatabaseId - The database ID of the metadata database
      Returns:
      the metadata SpannerConfig