Details
-
Improvement
-
Status: Resolved
-
P3
-
Resolution: Won't Fix
-
2.12.0, 2.13.0
-
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
- links to