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

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

guozhangwang closed pull request #4685: KAFKA-6560: Add docs for KIP-261
URL: https://github.com/apache/kafka/pull/4685
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/docs/streams/upgrade-guide.html b/docs/streams/upgrade-guide.html
index 1d5a342b2bb..f5c16c08cd2 100644
--- a/docs/streams/upgrade-guide.html
+++ b/docs/streams/upgrade-guide.html
@@ -34,9 +34,17 @@ <h1>Upgrade Guide and API Changes</h1>
     </div>
 
     <p>
-        If you are using Java 7 and want to upgrade from 1.0.x to 1.1.0 you 
don't need to make any code changes as the public API is fully backward 
compatible.
-        If you are using Java 8 method references in your Kafka Streams code 
you might need to update your code to resolve method ambiguties.
-       Hot-swaping the jar-file only might not work for this case.
+        If you want to upgrade from 1.1.x to 1.2.0 and you have customized 
window store implementations on the <code>ReadOnlyWindowStore</code> interface
+        you'd need to update your code to incorporate the newly added public 
APIs; otherwise you don't need to make any code changes.
+        See <a href="#streams_api_changes_120">below</a> for a complete list 
of 1.2.0 API and semantic changes that allow you to advance your application 
and/or simplify your code base.
+    </p>
+
+    <p>
+        If you want to upgrade from 1.0.x to 1.1.0 and you have customized 
window store implementations on the <code>ReadOnlyWindowStore</code> interface
+        you'd need to update your code to incorporate the newly added public 
APIs.
+        Otherwise, if you are using Java 7 you don't need to make any code 
changes as the public API is fully backward compatible;
+        but if you are using Java 8 method references in your Kafka Streams 
code you might need to update your code to resolve method ambiguities.
+        Hot-swaping the jar-file only might not work for this case.
         See <a href="#streams_api_changes_110">below</a> for a complete list 
of 1.1.0 API and semantic changes that allow you to advance your application 
and/or simplify your code base.
     </p>
 
@@ -64,12 +72,21 @@ <h1>Upgrade Guide and API Changes</h1>
         See <a href="#streams_api_changes_0101">below</a> a complete list of 
0.10.1 API changes that allow you to advance your application and/or simplify 
your code base, including the usage of new features.
     </p>
 
+    <!-- TODO: verify release verion and update `id` and `href` attributes 
(also at other places that link to this headline) -->
+    <h3><a id="streams_api_changes_120" 
href="#streams_api_changes_120">Streams API changes in 1.2.0</a></h3>
+    <p>
+        We have added support for methods in <code>ReadOnlyWindowStore</code> 
which allows for querying a single window's key-value pair.
+        For users who have customized window store implementations on the 
above interface, they'd need to update their code to implement the newly added 
method as well.
+        For more details, see <a 
href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-261%3A+Add+Single+Value+Fetch+in+Window+Stores";>KIP-261</a>.
+    </p>
+    
     <h3><a id="streams_api_changes_110" 
href="#streams_api_changes_110">Streams API changes in 1.1.0</a></h3>
     <p>
-       We have added support for methods in <code>ReadOnlyWindowStore</code> 
which allows for querying <code>WindowStore</code>s without the neccesity of 
providing keys.
+        We have added support for methods in <code>ReadOnlyWindowStore</code> 
which allows for querying <code>WindowStore</code>s without the necessity of 
providing keys.
+        For users who have customized window store implementations on the 
above interface, they'd need to update their code to implement the newly added 
method as well.
+        For more details, see <a 
href="https://cwiki.apache.org/confluence/display/KAFKA/KIP-205%3A+Add+all%28%29+and+range%28%29+API+to+ReadOnlyWindowStore";>KIP-205</a>.
     </p>
 
-
     <p>
        There is a new artifact <code>kafka-streams-test-utils</code> providing 
a <code>TopologyTestDriver</code>, <code>ConsumerRecordFactory</code>, and 
<code>OutputVerifier</code> class.
        You can include the new artifact as a regular dependency to your unit 
tests and use the test driver to test your business logic of your Kafka Streams 
application.


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Use single-point queries than range queries for windowed aggregation operators
> ------------------------------------------------------------------------------
>
>                 Key: KAFKA-6560
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6560
>             Project: Kafka
>          Issue Type: Improvement
>          Components: streams
>            Reporter: Guozhang Wang
>            Assignee: Guozhang Wang
>            Priority: Critical
>              Labels: needs-kip
>             Fix For: 1.2.0
>
>
> Today for windowed aggregations in Streams DSL, the underlying implementation 
> is leveraging the fetch(key, from, to) API to get all the related windows for 
> a single record to update. However, this is a very inefficient operation with 
> significant amount of CPU time iterating over window stores. On the other 
> hand, since the operator implementation itself have full knowledge of the 
> window specs it can actually translate this operation into multiple 
> single-point queries with the accurate window start timestamp, which would 
> largely reduce the overhead.
> The proposed approach is to add a single fetch API to the WindowedStore and 
> use that in the KStreamWindowedAggregate / KStreamWindowedReduce operators.



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

Reply via email to