flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ufuk Celebi (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (FLINK-5509) Replace QueryableStateClient keyHashCode argument
Date Fri, 27 Jan 2017 12:32:24 GMT

     [ https://issues.apache.org/jira/browse/FLINK-5509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Ufuk Celebi updated FLINK-5509:
    Issue Type: Sub-task  (was: Improvement)
        Parent: FLINK-5675

> Replace QueryableStateClient keyHashCode argument
> -------------------------------------------------
>                 Key: FLINK-5509
>                 URL: https://issues.apache.org/jira/browse/FLINK-5509
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Queryable State
>            Reporter: Ufuk Celebi
>            Priority: Minor
> When going over the low level QueryableStateClient with [~NicoK] we noticed that the
key hashCode argument can be confusing to users:
> {code}
> Future<byte[]> getKvState(
>   JobID jobId,
>   String name,
>   int keyHashCode,
>   byte[] serializedKeyAndNamespace)
> {code}
> The {{keyHashCode}} argument is the result of calling {{hashCode()}} on the key to look
up. This is what is send to the JobManager in order to look up the location of the key. While
pretty straight forward, it is repetitive and possibly confusing.
> As an alternative we suggest to make the method generic and simply call hashCode on the
object ourselves. This way the user just provides the key object.
> Since there are some early users of the queryable state API already, we would suggest
to rename the method in order to provoke a compilation error after upgrading to the actually
released 1.2 version.
> (This would also work without renaming since the hashCode of Integer (what users currently
provide) is the same number, but it would be confusing why it acutally works.)

This message was sent by Atlassian JIRA

View raw message