aljoscha commented on a change in pull request #10526: [FLINK-15090][build]
Reverse the dependency from flink-streaming-java to flink-client
URL: https://github.com/apache/flink/pull/10526#discussion_r390804854
##########
File path:
flink-clients/src/main/java/org/apache/flink/client/program/OptimizerPlanEnvironment.java
##########
@@ -22,143 +22,39 @@
import org.apache.flink.api.java.ExecutionEnvironment;
import org.apache.flink.api.java.ExecutionEnvironmentFactory;
import org.apache.flink.core.execution.JobClient;
-import org.apache.flink.util.Preconditions;
-
-import javax.annotation.Nullable;
-
-import java.io.ByteArrayOutputStream;
-import java.io.PrintStream;
/**
- * An {@link ExecutionEnvironment} that never executes a job but only extracts
the {@link
- * org.apache.flink.api.dag.Pipeline}.
+ * An {@link ExecutionEnvironment} that never executes a job but only extracts
the {@link Pipeline}.
*/
public class OptimizerPlanEnvironment extends ExecutionEnvironment {
- private Pipeline pipeline;
+ private static Pipeline pipeline;
Review comment:
This change has some very subtle implications. Before,
`OptimizerPlanEnvironment` was thread save, because
`initializeContextEnvironment()` would store the environment factory in a
thread-local field and the `Pipeline` field was not static. Now, multiple
threads would try and store the pipeline in this one shared static field.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services