Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-7732

Allow access to SpannerOptions in Beam

Details

    • Improvement
    • Status: Resolved
    • P3
    • Resolution: Won't Fix
    • 2.12.0, 2.13.0
    • Not applicable
    • io-java-gcp
    • None

    Description

      Beam hides the SpannerOptions object behind a SpannerConfig object because the SpannerOptions object is not serializable.

      This means that the only options that can be set are those that can be specified in SpannerConfig - limited to host, project, instance, database.

      Suggestion: add the possibility to set a SpannerOptionsFactory in SpannerConfig:

      public interface SpannerOptionsFactory extends Serializable {
         public SpannerOptions create();
      }
      

      This would allow the user use this factory class to specify custom SpannerOptions before they are passed onto the connectToSpanner() method; 

      connectToSpanner() would then become: 

      public SpannerAccessor connectToSpanner() {
        
        SpannerOptions.Builder builder = spannerOptionsFactory.create().toBuilder();
        // rest of connectToSpanner follows, setting project, host, etc.
      

       

      Attachments

        Issue Links

          Activity

            People

              nielm Niel Markwick
              nielm Niel Markwick
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h 10m
                  4h 10m