Local Flink config running standalone from IDE

ⅰ亾dé卋堺 提交于 2019-12-01 03:36:02

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!