sjwiesman opened a new pull request #31: [FLINK-16149][hotfix][core] Use 
GlobalConfigurationLoader on StreamPlanEnvironment
URL: https://github.com/apache/flink-statefun/pull/31
 
 
   This is a follow up to #27 
   
   I noticed when running a container-based deployment that my stateful 
function-specific configurations were not being respected. Other flink 
configurations were properly set. 
   
   If you follow the execution path of the stateful-function-launcher, you will 
see that it calls `PackagedProgramUtils#createJobGraph` which in turn sets an 
`OptimizerPlanEnvironment`. This is because it uses a Job-based deployment and 
the OptimizerPlanEnvironment pulls the job graph without executing the job so 
it can be embedded in the image.
   
   When this execution environment is set, 
`StreamExecutionEnvironment#getExecutionEnvironment` returns a 
`StreamPlanEnvironment`. This subclass of `StreamExecutionEnvironment` calls 
`StreamExecutionEnvironment`'s no-op constructor which sets an empty 
configuration object. 
   
   Because `StreamPlanEnvironment` implies job-based deployment, we can safely 
call `GlobalConfiguration#loadConfiguration`. In all other cases we fall back 
to reflection. 
   
   I have tested this using statefun images and deployed against a session 
cluster. 
   
   cc @igalshilman @tzulitai 

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

Reply via email to