You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Joe Wood (JIRA)" <ji...@apache.org> on 2017/05/15 15:21:04 UTC

[jira] [Created] (KAFKA-5243) Request to add row limit in ReadOnlyKeyValueStore range function

Joe Wood created KAFKA-5243:
-------------------------------

             Summary: Request to add row limit in ReadOnlyKeyValueStore range function
                 Key: KAFKA-5243
                 URL: https://issues.apache.org/jira/browse/KAFKA-5243
             Project: Kafka
          Issue Type: Improvement
          Components: streams
    Affects Versions: 0.10.1.1
            Reporter: Joe Wood


When using distributed queries across a cluster of stream stores it's quite common to use query pagination to limit the number of rows returned. The {{range}} function on {{ReadOnlyKeyValueStore}} only accepts the {{to}} and {{from}} keys. This means that the query created either unncessarily retrieves the entire range and manually limits the rows, or estimates the range based on the key values. Neither options are ideal for processing distributed queries.

This suggestion is to add an overload to the {{range}} function by adding a third (or replacement second) argument as a suggested row limit count. This means that the range of keys returned will not exceed the supplied count.
{code:java}
// Get an iterator over a given range of keys, limiting to limit elements.
KeyValueIterator<K,V>	range(K from, K to, int limit)
{code}





--
This message was sent by Atlassian JIRA
(v6.3.15#6346)