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

Jingsong Lee commented on FLINK-17789:
--------------------------------------

Thanks for your detailed analysis.

Now only {{map.get("}}{{prefix.}}{{prefix.k1")}}  can get v1.

I got your point, but I don't think it is good design. DelegatingConfiguration 
is Configuration, and the toMap should be consistent with addAllToProperties in 
Configuration. And for toMap, it should be consistent with get too. I mean, 
DelegatingConfiguration override these methods from base class Configuration.

> DelegatingConfiguration should remove prefix instead of add prefix in toMap
> ---------------------------------------------------------------------------
>
>                 Key: FLINK-17789
>                 URL: https://issues.apache.org/jira/browse/FLINK-17789
>             Project: Flink
>          Issue Type: Bug
>          Components: API / Core
>            Reporter: Jingsong Lee
>            Priority: Major
>             Fix For: 1.11.0
>
>
> {code:java}
> Configuration conf = new Configuration();
> conf.setString("k0", "v0");
> conf.setString("prefix.k1", "v1");
> DelegatingConfiguration dc = new DelegatingConfiguration(conf, "prefix.");
> System.out.println(dc.getString("k0", "empty")); // empty
> System.out.println(dc.getString("k1", "empty")); // v1
> System.out.println(dc.toMap().get("k1")); // should be v1, but null
> System.out.println(dc.toMap().get("prefix.prefix.k1")); // should be null, 
> but v1
> {code}



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

Reply via email to