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

ASF GitHub Bot commented on FLINK-8165:
---------------------------------------

Github user aljoscha commented on the issue:

    https://github.com/apache/flink/pull/5096
  
    This looks good! 👍 I'm guessing the test fails without the fix?
    
    @gyfora Do you want to use your committer powers and merge this to 
`release-1.4` and `master`?
    



> ParameterTools not serializable properly
> ----------------------------------------
>
>                 Key: FLINK-8165
>                 URL: https://issues.apache.org/jira/browse/FLINK-8165
>             Project: Flink
>          Issue Type: Bug
>          Components: Configuration, Java API
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: Gyula Fora
>            Assignee: Gyula Fora
>            Priority: Blocker
>             Fix For: 1.4.0
>
>
> Trying to get with default value after deserialization fails as the EmptyMap 
> doesn't support put operations for new default values.
> The problem is here:
> https://github.com/apache/flink/blob/release-1.4.0-rc2/flink-java/src/main/java/org/apache/flink/api/java/utils/ParameterTool.java#L621
> Reproduce:
> {code}
>       @Test
>       public void tes() throws IOException, ClassNotFoundException {
>               ParameterTool params = ParameterTool.fromMap(new HashMap<>());
>                 // works
>               params.get("asd", "default");
>               byte[] b = InstantiationUtil.serializeObject(params);
>               ParameterTool dparams = InstantiationUtil.deserializeObject(b, 
> getClass().getClassLoader());
>                  // fails
>               dparams.get("asd", "default");
>       }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to