Open fschueler opened 8 years ago
This can not only happen in hybrid_flink
mode but whenever collect()
is called somewhere in between. Anyone has an idea how we can keep track of the defined sources/sinks?
You can use createProgramPlan
and inspect the result for sinks.
Alternatively, use the ExecutionEnvironment
wrapper class using the delegate pattern and override the void registerDataSink(DataSink<?> sink) {
method in order to keep track of this kind of meta-information.
Unfortunately, createProgramPlan
already fails if no sinks are defined and the variable sinks
of the ExecutionEnvironment
is private. I guess we will have to go with the alternative.
Mabe the "final" execute
(plus check) could happen in the finally
block of the DMLScript in line 685, where the SparkContext is stopped.
Currently we call
env.execute()
after the execution of all program blocks if theExecutionContext
is of typeFlinkExecutionContext
. Inhybrid_flink
mode this leads to the problem thatexecute()
can be called even though no sinks are defined.We should somehow check if an adequate plan exists before calling
execute()
.