问题
If I'd like to run a Flink app locally, directly from within Intellij but I need to specify config params (like fs.hdfs.hdfssite to set up S3 access), is there any other way to provide those config params apart from ExecutionEnvironment.createLocalEnvironment(conf)? What if I want to use StreamExecutionEnvironment.getExecutionEnvironment? Can I have a Flink config in my project and point the local app to it?
Is this the proper way to do it? Or would you set up your IDE to submit the app to a real local Flink instance?
回答1:
To create a StreamExecutionEnvironment with configuration options, use this call StreamExecutionEnvironment.createLocalEnvironment(int parallelism, Configuration configuration)
回答2:
You can use StreamExecutionEnvironment.getExecutionEnvironment() -- it will figure out the current setting and if executed in an IDE will return an "LocalEnvironemnt".
Thus, should be able to use conf/flink-conf.yaml to set your configuration values.
来源:https://stackoverflow.com/questions/37743194/local-flink-config-running-standalone-from-ide