GitHub user bowenli86 opened a pull request:

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

    [FLINK-8365] [State Backend] Relax List type in HeapListState and 
HeapKeyedStateBackend

    ## What is the purpose of the change
    
    `stateTable` in `HeapListState` and 
`HeapKeyedStateBackend#createListState()` are both strongly typed to 
`ArrayList` right now. Relaxing that to `List` so we can avoid extra copies in 
some cases.
    
    Well, the copies in `HeapListState#update()` cannot be completely avoided. 
When users pass in an `AbstractList` to `update()` when there's no state 
before, it will break and we have to convert it to an `ArrayList` explicitly
    
    ## Brief change log
    
    Relax List type in HeapListState and HeapKeyedStateBackend
    
    ## Verifying this change
    
    This change is already covered by existing tests, such as 
*MemoryStateBackendTest*.
    
    ## Does this pull request potentially affect one of the following parts:
    
    none
    
    ## Documentation
    
    none

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

    $ git pull https://github.com/bowenli86/flink FLINK-8365

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

    https://github.com/apache/flink/pull/5326.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 #5326
    
----
commit dd2ec2fb3ce53549ba2f0162591658db34f1ac13
Author: Bowen Li <bowenli86@...>
Date:   2018-01-21T05:29:38Z

    [FLINK-8365] Relax List type in HeapListState and HeapKeyedStateBackend

commit f9d648fe6d26129a5a126cc860ccc0a58484a193
Author: Bowen Li <bowenli86@...>
Date:   2018-01-21T05:31:33Z

    remove unused code

----


---

Reply via email to