[ 
https://issues.apache.org/jira/browse/FLINK-17579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17127970#comment-17127970
 ] 

Andrey Zagrebin edited comment on FLINK-17579 at 6/8/20, 7:54 AM:
------------------------------------------------------------------

[~karmagyz] Thanks a lot for looking into this!

Why do you think it should be an environment variable and not a Flink option?
The Flink option can be also changed as a dynamic property argument (-D) for 
taskmanager.sh if you want to share flink-conf.yaml among TMs in standalone. 
Moreover, there are plans in the community to introduce a unified approach to 
set Flink options via environment variables. I would suggest to avoid 
multiplying ways of Flink configuration for better maintainability.

I also think it is dangerous to allow users to set fixed ids. We assume that 
all ids are unique everywhere in Flink. If some TMs accidently get the same id, 
it can lead to unpredictable failures. Also, it might be the case that if the 
same TM rejoins cluster, we assume that it will have another id to avoid 
collisions with its previous run in the system. Therefore, I would consider to 
keep ids always random and unique. The id could consist of a fixed part and 
still some random prefix: `<hostname>-<random-id>`.

Also a side note for future: we usually firstly [agree upon solution in JIRA 
issue and a committer has to assign a person to work on it before opening a 
PR|https://flink.apache.org/contributing/contribute-code.html#code-contribution-process].



was (Author: azagrebin):
[~karmagyz] Thanks for looking into this!

Why do you think it should be an environment variable and not a Flink option?
The Flink option can be also changed as a dynamic property argument (-D) for 
taskmanager.sh if you want to share flink-conf.yaml among TMs in standalone. 
Moreover, there are plans in the community to introduce a unified approach to 
set Flink options via environment variables. I would suggest to avoid 
multiplying ways of Flink configuration for better maintainability.

I also think it is dangerous to allow users to set fixed ids. We assume that 
all ids are unique everywhere in Flink. If some TMs accidently get the same id, 
it can lead to unpredictable failures. Also, it might be the case that if the 
same TM rejoins cluster, we assume that it will have another id to avoid 
collisions with its previous run in the system. Therefore, I would consider to 
keep ids always random and unique. The id could consist of a fixed part and 
still some random prefix: `<hostname>-<random-id>`.


> Set the resource id of taskexecutor according to environment variable if 
> exist in standalone mode
> -------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-17579
>                 URL: https://issues.apache.org/jira/browse/FLINK-17579
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Runtime / Coordination
>            Reporter: Yangze Guo
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.12.0
>
>
> Allow user to specify the resource id of TaskExecutor through the environment 
> variable in standalone mode. The name of that variable could be 
> {{FLINK_STANDALONE_TASK_EXECUTOR_ID}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to