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/02/14 06:23:41 UTC

[jira] [Commented] (FLINK-5790) Use list types when ListStateDescriptor extends StateDescriptor

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

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

GitHub user shixiaogang opened a pull request:

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

    [FLINK-5790][StateBackend] Use list types when ListStateDescriptor extends StateDescriptor

    1. Now the state serializer, instead of the element serializer, is stored in `ListStateDescriptor`. 
    2. `ArrayListTypeInfo` is introduced to help create serializers with the element type.
    3. `ArrayListSerializer` is moved to the package org.apache.flink.api.common.typeutils.base to avoid cyclic dependencies.
    4. Old implementation of `ListStateDescriptor` is kept in the migration package for back compatibility.
    


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

    $ git pull https://github.com/alibaba/flink flink-5790

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

    https://github.com/apache/flink/pull/3305.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 #3305
    
----
commit e8e11b7965365178453ab6eab78c6d5ac98f3537
Author: xiaogang.sxg <xi...@alibaba-inc.com>
Date:   2017-02-14T05:39:30Z

    Use list types when ListStateDescriptor extends StateDescriptor

commit ba8cdc919fc2e66b3e81f6f8566140bef53a9b96
Author: xiaogang.sxg <xi...@alibaba-inc.com>
Date:   2017-02-14T06:22:25Z

    Support back compatibility for ListStateDescriptor

----


> Use list types when ListStateDescriptor extends StateDescriptor
> ---------------------------------------------------------------
>
>                 Key: FLINK-5790
>                 URL: https://issues.apache.org/jira/browse/FLINK-5790
>             Project: Flink
>          Issue Type: Improvement
>            Reporter: Xiaogang Shi
>            Assignee: Xiaogang Shi
>
> Flink keeps the state serializer in {{StateDescriptor}}, but it's the serializer of list elements  that is put in {{ListStateDescriptor}}. The implementation is a little confusing. Some backends need to construct the state serializer with the element serializer by themselves.
> We should use an {{ArrayListSerializer}}, which is composed of the serializer of the element, in the {{ListStateDescriptor}}. It helps the backend to avoid constructing the state serializer.
> If a backend needs customized serialization of the state (e.g. {{RocksDBStateBackend}}), it still can obtain the element serializer from the {{ArrayListSerializer}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)