You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by KoenDG <gi...@git.apache.org> on 2017/09/20 08:55:09 UTC

[GitHub] kafka pull request #3919: [MINOR] Where possible, introduce EnumMap.

GitHub user KoenDG opened a pull request:

    https://github.com/apache/kafka/pull/3919

    [MINOR] Where possible, introduce EnumMap.

    Very simple PR, introduce EnumMap in 2 places of the code.
    
    EnumMap: https://docs.oracle.com/javase/7/docs/api/java/util/EnumMap.html
    
    EnumMap is meant to be used when the key of a Map is an Enum.
    
    From the documentation: 
    
    > Enum maps are represented internally as arrays. This representation is extremely compact and efficient.
    
    Should use less memory per instance and also be faster in lookup.

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

    $ git pull https://github.com/KoenDG/kafka enummap

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

    https://github.com/apache/kafka/pull/3919.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 #3919
    
----
commit 6af0ead332c40a531f0974e5ea7c2f97582d18d4
Author: KoenDG <kd...@gmail.com>
Date:   2017-09-20T07:33:54Z

    Where possible, introduce EnumMap.

----


---