[jira] [Commented] (FLINK-20411) The annotation config do not support complex structure

2020-11-30 Thread Yang Wang (Jira)


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

Yang Wang commented on FLINK-20411:
---

[~aitozi] So could I close this ticket?

> The annotation config do not support complex structure
> --
>
> Key: FLINK-20411
> URL: https://issues.apache.org/jira/browse/FLINK-20411
> Project: Flink
>  Issue Type: Improvement
>  Components: Deployment / Kubernetes
>Affects Versions: 1.11.2
>Reporter: Aitozi
>Priority: Minor
>
> Now we support user to set annotations by these config, the format is 
> "k1:v1,k2:v2".
>  # kubernetes.rest-service.annotations 
>  # kubernetes.jobmanager.annotations
>  # kubernetes.taskmanager.annotations
> But the annotation may be more complex structure like 
> "k1:\{"a1":"v1","a2":"v2"},k2:\{"a1":"v1","a2":"v2"}", It can not be parsed. 
> Shall we support annotation and labels just like the environment variables 
> use a prefix split mechanism, like :
>  # kubernetes.rest-service.annotation.k1="\{"a1":"v1","a2":"v2"}"
> By this we can set some default cluster annotations and labels and no need to 
> worry about overridden by user config.
>  
>  



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


[jira] [Commented] (FLINK-20411) The annotation config do not support complex structure

2020-11-30 Thread Aitozi (Jira)


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

Aitozi commented on FLINK-20411:


Got it, thanks for your explanation

> The annotation config do not support complex structure
> --
>
> Key: FLINK-20411
> URL: https://issues.apache.org/jira/browse/FLINK-20411
> Project: Flink
>  Issue Type: Improvement
>  Components: Deployment / Kubernetes
>Affects Versions: 1.11.2
>Reporter: Aitozi
>Priority: Minor
>
> Now we support user to set annotations by these config, the format is 
> "k1:v1,k2:v2".
>  # kubernetes.rest-service.annotations 
>  # kubernetes.jobmanager.annotations
>  # kubernetes.taskmanager.annotations
> But the annotation may be more complex structure like 
> "k1:\{"a1":"v1","a2":"v2"},k2:\{"a1":"v1","a2":"v2"}", It can not be parsed. 
> Shall we support annotation and labels just like the environment variables 
> use a prefix split mechanism, like :
>  # kubernetes.rest-service.annotation.k1="\{"a1":"v1","a2":"v2"}"
> By this we can set some default cluster annotations and labels and no need to 
> worry about overridden by user config.
>  
>  



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


[jira] [Commented] (FLINK-20411) The annotation config do not support complex structure

2020-11-29 Thread Yang Wang (Jira)


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

Yang Wang commented on FLINK-20411:
---

I think the ConfigOption in Map type could support complex structure now. All 
the thing you need to do is escape the strings. You could find more information 
here[1]. In your case, the following config option could work.

 
{code:java}
-Dkubernetes.jobmanager.annotations="'k1:''{"a1":"v1","a2":"v2"}''','k2:''{"a1":"v1","a2":"v2"}'''"{code}
 

[1]. 
https://github.com/apache/flink/blob/5af1d007e26e0fb437028d5882d79fe09baf937a/flink-core/src/main/java/org/apache/flink/configuration/StructuredOptionsSplitter.java#L56

> The annotation config do not support complex structure
> --
>
> Key: FLINK-20411
> URL: https://issues.apache.org/jira/browse/FLINK-20411
> Project: Flink
>  Issue Type: Improvement
>  Components: Deployment / Kubernetes
>Affects Versions: 1.11.2
>Reporter: Aitozi
>Priority: Minor
>
> Now we support user to set annotations by these config, the format is 
> "k1:v1,k2:v2".
>  # kubernetes.rest-service.annotations 
>  # kubernetes.jobmanager.annotations
>  # kubernetes.taskmanager.annotations
> But the annotation may be more complex structure like 
> "k1:\{"a1":"v1","a2":"v2"},k2:\{"a1":"v1","a2":"v2"}", It can not be parsed. 
> Shall we support annotation and labels just like the environment variables 
> use a prefix split mechanism, like :
>  # kubernetes.rest-service.annotation.k1="\{"a1":"v1","a2":"v2"}"
> By this we can set some default cluster annotations and labels and no need to 
> worry about overridden by user config.
>  
>  



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


[jira] [Commented] (FLINK-20411) The annotation config do not support complex structure

2020-11-28 Thread Aitozi (Jira)


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

Aitozi commented on FLINK-20411:


If we accept the new config, the old config can be replace by the new one, and 
the old one can be deprecated. Or if we want to use the current mode to config 
annotations, we may have to change the split logic in 
org.apache.flink.configuration.StructuredOptionsSplitter.  what's your idea cc 
[~fly_in_gis] ?

> The annotation config do not support complex structure
> --
>
> Key: FLINK-20411
> URL: https://issues.apache.org/jira/browse/FLINK-20411
> Project: Flink
>  Issue Type: Improvement
>  Components: Deployment / Kubernetes
>Affects Versions: 1.11.2
>Reporter: Aitozi
>Priority: Minor
>
> Now we support user to set annotations by these config, the format is 
> "k1:v1,k2:v2".
>  # kubernetes.rest-service.annotations 
>  # kubernetes.jobmanager.annotations
>  # kubernetes.taskmanager.annotations
> But the annotation may be more complex structure like 
> "k1:\{"a1":"v1","a2":"v2"},k2:\{"a1":"v1","a2":"v2"}", It can not be parsed. 
> Shall we support annotation and labels just like the environment variables 
> use a prefix split mechanism, like :
>  # kubernetes.rest-service.annotation.k1="\{"a1":"v1","a2":"v2"}"
> By this we can set some default cluster annotations and labels and no need to 
> worry about overridden by user config.
>  
>  



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