Re: [PR] KAFKA-15527: Update Javadoc for range and reverseRange in ReadOnlyKeyValueStore and update upgrade-guide.html for kafka streams webpage [kafka]

2023-10-26 Thread via GitHub


mjsax merged PR #14600:
URL: https://github.com/apache/kafka/pull/14600


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15527: Update Javadoc for range and reverseRange in ReadOnlyKeyValueStore and update upgrade-guide.html for kafka streams webpage [kafka]

2023-10-20 Thread via GitHub


hanyuzheng7 commented on code in PR #14600:
URL: https://github.com/apache/kafka/pull/14600#discussion_r1367661864


##
docs/streams/upgrade-guide.html:
##
@@ -133,6 +133,15 @@ <
 More details about the new config 
StreamsConfig#TOPOLOGY_OPTIMIZATION can be found in https://cwiki.apache.org/confluence/display/KAFKA/KIP-295%3A+Add+Streams+Configuration+Allowing+for+Optional+Topology+Optimization;>KIP-295.
 
 
+Streams API changes in 3.7.0
+
+IQv2 supports a RangeQuery that allows to specify 
unbounded, bounded, or half-open key-ranges.
+Now, we add reverseRange and reverseAll query for 
RangeQuery. The concepts of reverseRange and reverseAll are not 
tied to any specific method or class.
+Rather, they represent functionalities we wish to achieve. To achieve 
the functionalities of reverseRange and reverseAll, we can introduce a method 
named withDescendingKeys() for reversed queries.
+Utilizing these, the query results are ordered based on the serialized 
byte[] of the keys, not the 'logical' key order.
+https://cwiki.apache.org/confluence/display/KAFKA/KIP-985%3A+Add+reverseRange+and+reverseAll+query+over+kv-store+in+IQv2;>KIP-985
+

Review Comment:
   ok, I will update it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15527: Update Javadoc for range and reverseRange in ReadOnlyKeyValueStore and update upgrade-guide.html for kafka streams webpage [kafka]

2023-10-20 Thread via GitHub


hanyuzheng7 commented on code in PR #14600:
URL: https://github.com/apache/kafka/pull/14600#discussion_r1367619716


##
streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyKeyValueStore.java:
##
@@ -48,13 +48,13 @@ public interface ReadOnlyKeyValueStore {
  * Get an iterator over a given range of keys. This iterator must be 
closed after use.
  * The returned iterator must be safe from {@link 
java.util.ConcurrentModificationException}s
  * and must not return null values.
- * Order is not guaranteed as bytes lexicographical ordering might not 
represent key order.
+ * Order based on the serialized byte[] of the keys, not the 'logical' key 
order.

Review Comment:
   ok, I will fix it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15527: Update Javadoc for range and reverseRange in ReadOnlyKeyValueStore and update upgrade-guide.html for kafka streams webpage [kafka]

2023-10-20 Thread via GitHub


hanyuzheng7 commented on PR #14600:
URL: https://github.com/apache/kafka/pull/14600#issuecomment-1773625949

   > I think we should also improve `RangeQuery` JavaDocs in addition, to be 
clear about ordering guarantees there, too.
   
   ok


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] KAFKA-15527: Update Javadoc for range and reverseRange in ReadOnlyKeyValueStore and update upgrade-guide.html for kafka streams webpage [kafka]

2023-10-20 Thread via GitHub


mjsax commented on code in PR #14600:
URL: https://github.com/apache/kafka/pull/14600#discussion_r1367568404


##
docs/streams/upgrade-guide.html:
##
@@ -133,6 +133,15 @@ <
 More details about the new config 
StreamsConfig#TOPOLOGY_OPTIMIZATION can be found in https://cwiki.apache.org/confluence/display/KAFKA/KIP-295%3A+Add+Streams+Configuration+Allowing+for+Optional+Topology+Optimization;>KIP-295.
 
 
+Streams API changes in 3.7.0
+
+IQv2 supports a RangeQuery that allows to specify 
unbounded, bounded, or half-open key-ranges.
+Now, we add reverseRange and reverseAll query for 
RangeQuery. The concepts of reverseRange and reverseAll are not 
tied to any specific method or class.
+Rather, they represent functionalities we wish to achieve. To achieve 
the functionalities of reverseRange and reverseAll, we can introduce a method 
named withDescendingKeys() for reversed queries.
+Utilizing these, the query results are ordered based on the serialized 
byte[] of the keys, not the 'logical' key order.
+https://cwiki.apache.org/confluence/display/KAFKA/KIP-985%3A+Add+reverseRange+and+reverseAll+query+over+kv-store+in+IQv2;>KIP-985
+

Review Comment:
   I think we can simplify the paragraph (we try to be brief):
   ```
   IQv2 supports RangeQuery that allows to specify unbounded, 
bounded, or half-open key-ranges, which return data in ascending 
(byte[]-lexicographical) order (per partition).
   https://cwiki.apache.org/confluence/display/KAFKA/KIP-985%3A+Add+reverseRange+and+reverseAll+query+over+kv-store+in+IQv2;>KIP-985
 extends this functionality by adding .withDescendingKeys() to 
allow user to receive data in descending order.
   ```



##
streams/src/main/java/org/apache/kafka/streams/state/ReadOnlyKeyValueStore.java:
##
@@ -48,13 +48,13 @@ public interface ReadOnlyKeyValueStore {
  * Get an iterator over a given range of keys. This iterator must be 
closed after use.
  * The returned iterator must be safe from {@link 
java.util.ConcurrentModificationException}s
  * and must not return null values.
- * Order is not guaranteed as bytes lexicographical ordering might not 
represent key order.
+ * Order based on the serialized byte[] of the keys, not the 'logical' key 
order.

Review Comment:
   `Order [is] based`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org