Abacn commented on code in PR #36730:
URL: https://github.com/apache/beam/pull/36730#discussion_r2495700791


##########
runners/flink/src/main/java/org/apache/beam/runners/flink/FlinkPipelineExecutionEnvironment.java:
##########
@@ -161,6 +167,36 @@ public PipelineResult executePipeline() throws Exception {
     }
   }
 
+  /** Prevents ThreadGroup destruction while Flink cleanup threads are still 
running. */
+  private void ensureFlinkCleanupComplete(Object executionEnv) {
+    String javaVersion = System.getProperty("java.version");
+    if (javaVersion == null || !javaVersion.startsWith("1.8")) {
+      return;

Review Comment:
   sorry realize this parameter is actually useful. We can do
   
   ```
   if (executionEnv instanceof 
org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.LocalStreamEnvironment
 || executionEnv instanceof 
org.apache.flink.api.java.ExecutionEnvironment.LocalEnvironment)
   ```
   
   this is more reliable than check getFlinkMaster below



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