[
https://issues.apache.org/jira/browse/LENS-266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15296272#comment-15296272
]
Puneet Gupta commented on LENS-266:
-----------------------------------
The current get result API
"org.apache.lens.server.query.QueryServiceResource#getResultSet" takes
queryHandle, fromindex and fetchSize as inputs . But the last two inputs are
ignored as of now and the complete result is returned.
Need for supporting paginated InMemory result
1. Lets say there is a dashboard which pulls report via InMemory results (i,e
lens.query.enable.persistent.resultset=false).
2. The dashboard shows a paginated table and most users of this dashboard see
only the first page and rarely navigate to other pages
Note:
1. In most cases the resultset is of type FORWARD_ONLY . In this case resultset
cursor can move only forward. That means fromIndex can not be honored unless it
is greater than the previous (fromIndex + fetchSize).
2. Since we can not find the total number of rows in resultset (until all rows
are read) in all cases, it would not be possible for dashboard to know how many
pages exist and display that to the user. The dashboard can just show first
page and a link to next / or take desired page number as input from user (which
seems unlikely as user does not know the total number of pages). The link to
next page/ or the page number specified by user may or may not return any rows
depending on the number of rows in the result. In the latter case there is no
going back ( as in if the result has 100 rows and page size is 10 and the user
is on page 1 and then requests for page 11, the user will not find any rows and
it won't be possible to go back to page 2-10 since its a forward only
resultset). Taking this into account, probably the "go to page number option"
should not be provided.
3. When user accesses partial result, the corresponding connection to
datasource/db is blocked until the user consumes entire result or until result
TTL (lens.server.inmemory.resultset.ttl.secs) is reached which is 5 mins by
default. This can cause resource issues if most users consume just one page and
never access further pages. We need to handle such cases.
We also need to think if we need to provide this option for
EXECUTE_WITH_TIMEOUT also and how.
> Resultset not honouring index and size params
> ---------------------------------------------
>
> Key: LENS-266
> URL: https://issues.apache.org/jira/browse/LENS-266
> Project: Apache Lens
> Issue Type: Bug
> Components: client, server
> Reporter: Arshad Matin
> Fix For: 2.6
>
>
> While fetching resultset for a query with say index = 1 and size = 1 , still
> lens server will fetch the whole resultset
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)