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

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

GitHub user shixiaogang opened a pull request:

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

    [FLINK-5917][state] Remove size() method from MapState

    The `size()` method is removed from `MapState` because its implementation 
is costly in the backends.

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

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

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

    https://github.com/apache/flink/pull/3462.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 #3462
    
----
commit 6906b15ff593f46e106348aa1f5772e6b78efe74
Author: xiaogang.sxg <[email protected]>
Date:   2017-03-03T02:27:11Z

    Remove size() method from MapState

----


> Remove MapState.size()
> ----------------------
>
>                 Key: FLINK-5917
>                 URL: https://issues.apache.org/jira/browse/FLINK-5917
>             Project: Flink
>          Issue Type: Improvement
>          Components: DataStream API
>    Affects Versions: 1.3.0
>            Reporter: Aljoscha Krettek
>            Assignee: Xiaogang Shi
>            Priority: Blocker
>             Fix For: 1.3.0
>
>
> I'm proposing to remove {{size()}} because it is a prohibitively expensive 
> operation and users might not be aware of it. Instead of {{size()}} users can 
> use an iterator over all mappings to determine the size, when doing this they 
> will be aware of the fact that it is a costly operation.
> Right now, {{size()}} is only costly on the RocksDB state backend but I think 
> with future developments on the in-memory state backend it might also become 
> an expensive operation there.



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

Reply via email to