Hi, Kamal

This is possible, you can use static variable.

Best,
Ron

Hang Ruan <ruanhang1...@gmail.com> 于2023年8月11日周五 13:46写道:

> Hi, Kamal.
>
> Each TaskManager is a JVM process and each task slot is a thread of the
> TaskManager. More information see [1].
> The static fields could be shared among subtasks in the same TaskManager.
> If the subtasks are running in the different TaskManager, they cannot share
> the static fields.
>
> Best,
> hang
>
> [1]
> https://nightlies.apache.org/flink/flink-docs-release-1.17/docs/concepts/flink-architecture/#task-slots-and-resources
>
> Kamal Mittal via user <user@flink.apache.org> 于2023年8月11日周五 12:53写道:
>
>> Hello,
>>
>>
>>
>> Is it possible to create global/shared objects like static which are
>> shared among slots in a task manager?
>>
>>
>>
>> Is it ok to create such objects in flink?
>>
>>
>>
>> Rgds,
>>
>> Kamal
>>
>

Reply via email to