It just initializes the field to ensure it is set when it is
deserialized server-side.
There is neither a guarantee nor requirement that the APIs must set the
ExecutionConfig at least once, so this ensures that on the server-side
the execution config is never null.
On 3/26/2021 11:18 AM, ZhangWei wrote:
Hello:
I was recently study the code about how the JobGraph generates. I noticed in the
constructor of StreamingJobGraphGenerator, it constructs a JobGraph. And in the
constructor of JobGraph, it called setExecutionConfig(new ExecutionConfig()) which
serialized a default ExecutionConfig. The comment said "Further modification of the
referenced ExecutionConfig object will not affect this serialized copy".
While at the end of StreamingJobGraphGenerator#createJobGraph(), it called
jobGraph.setExecutionConfig(streamGraph.getExecutionConfig()) again, which sets
the ExecutionConfig contains the parameters we have changed. I think that does
the right thing.
So I wonder what the setExecutionConfig() in the constructor of JobGraph
for? It seems meaningless for me.
Best regards!