GitHub user aljoscha opened a pull request:

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

    [FLINK-6018] Add tests for KryoSerializer restore with registered types

    This is the result of the discussion in #3534. 
    
    I changed `TypeSerializer.isCompatibleWith()` to 
`TypeSerializer.canRestoreFrom` because the relation is not necessarily 
symmetric.
     
    I added a `KryoSerializer.canRestoreFrom()` that only allows restoring when 
we previously didn't have registered types/serializers.
    
    I added a whole bunch of tests in `StateBackendTestBase`, this should be 
review most thoroughly.
    
    R: @StephanEwen and @tzulitai because this probably is interesting with the 
serialiser update story that you're working on.

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

    $ git pull https://github.com/aljoscha/flink jira-6018-state-init-fixups

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

    https://github.com/apache/flink/pull/3562.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 #3562
    
----
commit f0c3af53d24a3eac914cf1ceb3b1761a40553dfe
Author: Aljoscha Krettek <aljoscha.kret...@gmail.com>
Date:   2017-03-16T14:17:05Z

    [FLINK-6018] Add tests for KryoSerializer restore with registered types

commit b90cf5cad5176d8edcbd189a9b65cc4999cddd53
Author: Aljoscha Krettek <aljoscha.kret...@gmail.com>
Date:   2017-03-17T09:56:13Z

    [FLINK-6018] Rename isCompatibleWith() to canRestoreFrom()
    
    This make the method asymetric because in the case of KryoSerializer we
    can restore from state that was stored using no registed
    types/serializers while the other way around is not possible.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to