You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/06/19 10:54:00 UTC

[jira] [Commented] (FLINK-6948) EnumValueSerializer cannot handle removed enum values

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

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

GitHub user tillrohrmann opened a pull request:

    https://github.com/apache/flink/pull/4142

    [FLINK-6948] Harden EnumValueSerializer to detect changed enum indices

    This PR changes the seriailization format of the ScalaEnumSerializerConfigSnapshot to also include the
    ordinal value of an enum value when being deserialized. This allows to detect if the ordinal values
    have been changed and, thus, if migration is required.
    
    IMPORTANT: This PR changes the serialization format of ScalaEnumSerializerConfigSnapshot.
    
    cc @tzulitai 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tillrohrmann/flink hardenEnumValueSerializerTest

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/4142.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4142
    
----
commit 80b2d61b58be06f9e3f40b35f0b215421ad86890
Author: Till Rohrmann <tr...@apache.org>
Date:   2017-06-13T21:26:10Z

    [FLINK-6836] [tests] Fix YARNSessionCapacitySchedulerITCase to work with Hadoop 2.6.5, 2.7.3 and 2.8.0
    
    Due to MNG-5899, maven cannot resolve dependency reduced poms in a multi project build. Therefore,
    flink-yarn-tests pulls in a wrong version of org.apache.httpcomponents.httpclient which does not work
    with Hadoop's ServletUtils together. As a solution we have to move the dependency management for the
    httpclient and httpcore version into the parent pom.xml.
    
    Another problem is the version of these libraries which has been recently bumped. In 4.4, httpclient
    changed its behaviour such that URLEncodedUtils#parse(String, Charset) now throws a NPE if the first
    parameter is null. In 4.2.6, an empty list was returned instead. Due to this incompatibility, we reverted
    the change and set the version to its previous value.
    
    Bump httpclient to 4.5.3 and httpcore to 4.4.6
    
    This closes #4120.

commit 7c7fe493f2dd766a8ddf3de240f9447f857b423a
Author: Till Rohrmann <tr...@apache.org>
Date:   2017-06-14T14:53:49Z

    [FLINK-6921] [serializer] Allow EnumValueSerializer to deal with appended enum values
    
    The problem was that we don't check the bounds of the array with the enum names contained
    in the ScalaEnumSerializerConfigSnapshot.
    
    This PR also adds an Enumeration upgrade test which makes sure that appended fields are
    supported without migration. Moreover, it checks that a field removal and an order change
    leads to a required migration.
    
    This closes #4126.

commit 9576530a0c5c3fe866bf87f126b29eb5acb56ba2
Author: Till Rohrmann <tr...@apache.org>
Date:   2017-06-19T10:49:05Z

    [FLINK-6948] Harden EnumValueSerializer to detect changed enum indices
    
    This PR changes the seriailization format of the ScalaEnumSerializerConfigSnapshot to also include the
    ordinal value of an enum value when being deserialized. This allows to detect if the ordinal values
    have been changed and, thus, if migration is required.
    
    IMPORTANT: This PR changes the serialization format of ScalaEnumSerializerConfigSnapshot.

----


> EnumValueSerializer cannot handle removed enum values
> -----------------------------------------------------
>
>                 Key: FLINK-6948
>                 URL: https://issues.apache.org/jira/browse/FLINK-6948
>             Project: Flink
>          Issue Type: Bug
>          Components: Type Serialization System
>    Affects Versions: 1.3.1, 1.4.0
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>            Priority: Critical
>
> The {{EnumValueSerializer}} cannot handle remove enum values or enum values whose ordinal value have been changed. We should try to detect these cases and require migration.



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