[
https://issues.apache.org/jira/browse/KAFKA-13526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17456150#comment-17456150
]
John Roesler commented on KAFKA-13526:
--------------------------------------
Tried the serde passing thing, which didn't work that well. I might have missed
something simple, though: https://github.com/apache/kafka/pull/11583
> IQv2: Consider more generic logic for mapping between binary and typed queries
> ------------------------------------------------------------------------------
>
> Key: KAFKA-13526
> URL: https://issues.apache.org/jira/browse/KAFKA-13526
> Project: Kafka
> Issue Type: Sub-task
> Reporter: John Roesler
> Priority: Major
>
> Right now, typed queries (like KeyQuery) need to be specially handled and
> translated to their binary counterparts (like RawKeyQuery). This happens in
> the Metered store layers, where the serdes are known. It is necessary because
> lower store layers are only able to handle binary data (because they don't
> know the serdes).
> This situation is not ideal, since the Metered store layers will grow to host
> quite a bit of query handling and translation logic, because the relationship
> between typed queries and binary counterparts is not obvious, and because we
> can only automatically translate known query types. User-supplied queries and
> stores will have to work things out using their a-priori knowledge of the
> serdes.
>
> One suggestion (from [~mjsax] ) is to come up with some kind of generic
> "query mapping" API, which the Metered stores would use to translate back and
> forth between typed and raw keys and values. Users would be able to supply
> their own mappings along with their custom queries.
> Another option would be to have the Metered stores attach the serdes to the
> query on the way down and then to the result on the way up. Then, the serdes
> would be available in the bytes store (as part of the request) and to the
> users when they get their results (as part of the response).
> Other options may also surface once we start playing with ideas.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)