[ 
https://issues.apache.org/jira/browse/KAFKA-2984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15056429#comment-15056429
 ] 

ASF GitHub Bot commented on KAFKA-2984:
---------------------------------------

GitHub user ymatsuda opened a pull request:

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

    KAFKA-2984: ktable sends old values when required

    @guozhangwang 
    
    At DAG level, `KTable<K,V>` sends (key, (new value, old value)) to down 
stream.  This is done by wrapping the new value and the old value in an 
instance of `Change<V>` class and sending it as a "value" part of the stream. 
The old value is omitted (set to null) by default for optimization. When any 
downstream processor needs to use the old value, the framework should enable it 
(see `KTableImpl.enableSendingOldValues()` and implementations of 
`KTableProcessorSupplier.enableSensingOldValues()`).
    
    NOTE: This is meant to be used by aggregation. But, if there is a use case 
like a SQL database trigger, we can add a new KTable method to expose this. 

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

    $ git pull https://github.com/ymatsuda/kafka trigger

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

    https://github.com/apache/kafka/pull/672.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 #672
    
----
commit 41bbef2c1ba6e170403f7b48fcb618bbe49d9b6c
Author: Yasuhiro Matsuda <yasuh...@confluent.io>
Date:   2015-12-11T22:41:55Z

    KAFKA-2984: KTable should send old values along with new values to 
downstreams

commit 91a9fad6e729bf631d82a88db5bb6ec483ae2062
Author: Yasuhiro Matsuda <yasuh...@confluent.io>
Date:   2015-12-14T18:08:15Z

    Merge branch 'trunk' of github.com:apache/kafka into trigger

commit 7a1b689c594d2e859454c28a2367df793178d3b9
Author: Yasuhiro Matsuda <yasuh...@confluent.io>
Date:   2015-12-14T18:08:50Z

    method names

----


> KTable should send old values along with new values to downstreams
> ------------------------------------------------------------------
>
>                 Key: KAFKA-2984
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2984
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: kafka streams
>    Affects Versions: 0.9.0.1
>            Reporter: Yasuhiro Matsuda
>            Assignee: Yasuhiro Matsuda
>
> Old values are necessary for implementing aggregate functions. KTable should 
> augment an event with its old value. Basically KTable stream is a stream of 
> (key, (new value, old value)) internally. The old value may be omitted when 
> it is not used in the topology.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to