kennknowles commented on a change in pull request #15904:
URL: https://github.com/apache/beam/pull/15904#discussion_r743125879



##########
File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnSignatures.java
##########
@@ -2530,6 +2531,17 @@ public static boolean usesState(DoFn<?, ?> doFn) {
     return signatureForDoFn(doFn).usesState() || requiresTimeSortedInput(doFn);
   }
 
+  private static boolean containsBundleFinalizer(List<Parameter> parameters) {
+    return parameters.stream().anyMatch(parameter -> parameter instanceof 
BundleFinalizerParameter);

Review comment:
       Technically, the design of the class is to use `parameter.match(new 
Cases() { ... })` but I'll accept this.

##########
File path: 
runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowRunner.java
##########
@@ -2303,7 +2303,8 @@ static String 
getDefaultContainerVersion(DataflowPipelineOptions options) {
   static boolean useUnifiedWorker(DataflowPipelineOptions options) {
     return hasExperiment(options, "beam_fn_api")
         || hasExperiment(options, "use_runner_v2")
-        || hasExperiment(options, "use_unified_worker");
+        || hasExperiment(options, "use_unified_worker")
+        || hasExperiment(options, "enable_prime");

Review comment:
       CC @robertwb spreading the knowledge that we are doing this. I think it 
is safe and adds value for users to be able to reject bundle finalizer usage on 
runner v1. Are there other pitfalls here? (other than any effect on future 
migrations)




-- 
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