flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aljoscha Krettek (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (FLINK-8165) ParameterTools not serializable properly
Date Wed, 29 Nov 2017 14:49:00 GMT

     [ https://issues.apache.org/jira/browse/FLINK-8165?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Aljoscha Krettek closed FLINK-8165.
-----------------------------------
    Resolution: Fixed

Fixed on master in
731896ae709753d5cc225d94585cb0d738e86ca9

Fixed on release-1.4 in
9169ca3f15bb277e918aaf8dfd23b014d0ea67cc

> 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)

Mime
View raw message