flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gyula Fora (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLINK-8165) ParameterTools not serializable properly
Date Wed, 29 Nov 2017 08:58:00 GMT
Gyula Fora created FLINK-8165:
---------------------------------

             Summary: 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
            Priority: Critical


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:

	@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");
	}



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

Mime
View raw message