steveniemitz commented on code in PR #30489:
URL: https://github.com/apache/beam/pull/30489#discussion_r1514671158


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigtable/BigtableConfigTranslator.java:
##########
@@ -149,7 +154,45 @@ private static BigtableDataSettings.Builder 
buildBigtableDataSettings(
     configureChannelPool(dataBuilder.stubSettings(), config);
     configureHeaderProvider(dataBuilder.stubSettings(), pipelineOptions);
 
-    return dataBuilder;
+    // Provide a way to override any BigtableDataSettings
+    String overrideClassName =
+        ExperimentalOptions.getExperimentValue(pipelineOptions, 
BIGTABLE_SETTINGS_OVERRIDE);
+
+    return configureSettingsOverride(overrideClassName, dataBuilder, 
pipelineOptions);
+  }
+
+  @SuppressWarnings("unchecked")
+  private static BigtableDataSettings.Builder configureSettingsOverride(
+      @Nullable String override,
+      BigtableDataSettings.Builder dataBuilder,
+      PipelineOptions pipelineOptions) {
+    if (override == null) {
+      return dataBuilder;
+    }
+    Object object;

Review Comment:
   Ah ha: not blocking but you might want to look into using this instead to 
fit into the normal beam pattern of doing this:  
https://github.com/apache/beam/blob/b6301b5205800ce3604a751964211d6061b09f02/sdks/java/core/src/main/java/org/apache/beam/sdk/util/InstanceBuilder.java



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to