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:



	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

View raw message