Hi Flavio,

I think the recommended approach is as follows: (then you don't need to
create to environments)

final Configuration conf = new Configuration();
conf.setLong(...)
env = new LocalEnvironment(conf);

I agree that in theory it would be nicer if the configuration returned was
editable, but the handling of configs in Flink is pretty involved already.


On Tue, Jul 28, 2020 at 10:13 AM Flavio Pompermaier <pomperma...@okkam.it>
wrote:

> Hi to all,
> migrating to Flink 1.11 I've tried to customize the exec env in this way:
>
> ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
> BatchTableEnvironment bte = BatchTableEnvironment.create(env);
> final Configuration conf = bte.getConfig().getConfiguration();
> conf.setLong(TaskManagerOptions.TASK_CANCELLATION_TIMEOUT, 0);
> conf.setString(AkkaOptions.ASK_TIMEOUT, "10 min");
> conf.setString(AkkaOptions.TCP_TIMEOUT, "10 min");
> conf.setString(AkkaOptions.STARTUP_TIMEOUT, "10 min");
> conf.set(ClientOptions.CLIENT_TIMEOUT, Duration.ofMinutes(10));
>
> This seems to not have any influence on the setting in my local env and I
> need to create env as a new LocalEnvironment if I want to customize it
> during tests:
>
> final Configuration conf = env.getConfiguration();
> conf.setLong(...)
> env = new LocalEnvironment(conf);
>
> Is this the desired behaviour or is it a bug?
> Wouldn't it be possible to allow customization of env config it's actually
> editable?
>
> Best,
> Flavio
>

Reply via email to