从 IDE 独立运行的本地 Flink 配置 [英] Local Flink config running standalone from IDE

查看:34
本文介绍了从 IDE 独立运行的本地 Flink 配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我想在本地直接从 Intellij 中运行 Flink 应用程序,但我需要指定配置参数(如 fs.hdfs.hdfssite 来设置 S3 访问),还有其他方法可以提供这些配置参数吗?除了ExecutionEnvironment.createLocalEnvironment(conf)?如果我想使用 StreamExecutionEnvironment.getExecutionEnvironment 怎么办?我可以在我的项目中有一个 Flink 配置并将本地应用程序指向它吗?

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?

这是正确的做法吗?或者您会设置您的 IDE 以将应用程序提交给真正的本地 Flink 实例吗?

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?

推荐答案

要创建带有配置选项的 StreamExecutionEnvironment,请使用此调用 StreamExecutionEnvironment.createLocalEnvironment(int parallelism, Configuration configuration)代码>

To create a StreamExecutionEnvironment with configuration options, use this call StreamExecutionEnvironment.createLocalEnvironment(int parallelism, Configuration configuration)

这篇关于从 IDE 独立运行的本地 Flink 配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆