Hi Aljoscha, Thanks for your comment. I agree that we should not introduce tight coupling with PipelineExecutor to the execution environment. With that in mind, to distinguish the per-job and session mode, we can introduce a new method, naming isPerJobModeExecutor, in the PipelineExecutorFactory or PipelineExecutor so that the execution environment can recognize per-job mode without instanced checks on the PipelineExecutor. What do you think? Any thoughts or suggestions are very welcome.
Best, Xuannan On Sep 10, 2020, 4:51 PM +0800, Aljoscha Krettek <aljos...@apache.org>, wrote: > On 10.09.20 09:00, Xuannan Su wrote: > > > How do you imagine that? Where do you distinguish between per-job and > > > session mode? > > The StreamExecutionEnvironment can distinguish between per-job and session > > mode by the type of the PipelineExecutor, i.e, AbstractJobClusterExecutor > > vs AbstractSessionClusterExecutor. > > I can just comment on this last part but we should not to instanceof > checks on the PipelineExecutor. The PipelineExecutor is an interface on > purpose and the execution environments should not try and guess > knowledge about the executor implementations. This would introduce tight > coupling which might break in the future if the executors were to change. > > Best, > Aljoscha