其实是没有Public的API去从文件load Configuration的,因为我理解这是个Client端的内部逻辑

在用户调用了flink run以后,client会把conf/flink-conf.yaml加载,并apply上dynamic options,
然后会把这个Configuration传给各个Environment去使用

如果TableEnvironment在构建的时候没有使用传过来的Configuration,那-yD就没有办法生效了
只能用户在代码里面再设置一次


Best,
Yang

Jingsong Li <[email protected]> 于2020年7月3日周五 下午3:19写道:

> Hi,
>
> 如果你是写代码来使用TableEnvironment的,
> 你要显示的在代码中塞进TableConfig中:
>
> Configuration configuration = tEnv.getConfig().getConfiguration();
> configuration.addAll(GlobalConfiguration.loadConfiguration());
>
> CC: @Yang Wang <[email protected]> 
> GlobalConfiguration是个internal的类,有没有public
> API获取对应的Configuration?
>
> Best,
> Jingsong
>
> On Fri, Jul 3, 2020 at 3:07 PM Yang Wang <[email protected]> wrote:
>
>> 我理解在Yarn上运行,通过-yD传入和写在flink-conf.yaml里面都是可以生效的
>>
>>
>> Best,
>> Yang
>>
>> liangji <[email protected]> 于2020年7月2日周四 下午6:12写道:
>>
>> >
>> >
>> https://ci.apache.org/projects/flink/flink-docs-release-1.10/dev/table/config.html#execution-options
>> > // instantiate table environment
>> > TableEnvironment tEnv = ...
>> >
>> > // access flink configuration
>> > Configuration configuration = tEnv.getConfig().getConfiguration();
>> > // set low-level key-value options
>> > configuration.setString("table.exec.mini-batch.enabled", "true");
>> > configuration.setString("table.exec.mini-batch.allow-latency", "5 s");
>> > configuration.setString("table.exec.mini-batch.size", "5000");
>> >
>> > 请问下,table的这些参数是不是只能在代码里面设置,通过 -yd 传入可否生效呢?
>> >
>> >
>> >
>> > --
>> > Sent from: http://apache-flink.147419.n8.nabble.com/
>> >
>>
>
>
> --
> Best, Jingsong Lee
>

回复