You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Hashan Gayasri Udugahapattuwa (JIRA)" <ji...@apache.org> on 2018/06/20 12:27:00 UTC

[jira] [Created] (KAFKA-7079) ValueTransformer#transform does not pass the key

Hashan Gayasri Udugahapattuwa created KAFKA-7079:
----------------------------------------------------

             Summary: ValueTransformer#transform does not pass the key
                 Key: KAFKA-7079
                 URL: https://issues.apache.org/jira/browse/KAFKA-7079
             Project: Kafka
          Issue Type: Bug
          Components: streams
    Affects Versions: 1.1.0
         Environment: Fedora 27
            Reporter: Hashan Gayasri Udugahapattuwa


ValueTransformers' transform method doesn't pass the key to user-code. Reporting this as a bug since it currently requires workarounds.

 

Context:

I'm currently in the process of converting two stateful "*aggregate*" DSL operations to the Processor API since the state of those operations are relatively large and takes 99% + of CPU time (when profiled) for serializing and deserializing them via Kryo. 

Since DSL aggregations use state stores of [Bytes, Array[Byte]]] even when using the in-memory state store, it seems like the only way to reduce the serialization/deserialization overhead is to convert heavy aggregates to *transform*s.

In my case, *ValueTransformer* seems to be the option. However, since ValueTransformers' _transform_ method only exposes the _value_, I'd either have to pre-process and add the key to the value or use *Transformer* instead (which is not my intent).

 

As internal _*InternalValueTransformerWithKey*_ already has the readOnlyKey, it seems like a good idea to pass the key to the transform method as well, esp since in a stateful transformation, generally the state store has to be queried by the key.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)