> On Sept. 22, 2016, 5:56 a.m., Amareshwari Sriramadasu wrote:
> > lens-client/src/main/java/org/apache/lens/client/LensClient.java, line 330
> > <https://reviews.apache.org/r/52119/diff/1/?file=1507243#file1507243line330>
> >
> >     We would need an api to getResults for particular handle as well - to 
> > access it across clients, no? I see current caching may not work. But if 
> > not cached, client should fetch it from srver.

Upon execution of a new query in lens client, a new statement object isn't 
created, so essentially, the statement object holds only LensQuery handle of 
last executed query. The current assumption in getLensStatement(queryHandle) 
will return query handle specific statement is broken. If there is merit in 
caching LensQuery objects of every query executed by a client/statement, then 
this requires a far deeper fix. I can change the scope of the issue and revise 
the patch accordingly, but we need to be convinced about the need to cache the 
LensQuery object. It seems unncessary to cache a LensQuery object particuarly 
if it is unfinished, as the state might change as the query makes progress. The 
caching can happen in the consuming application in such case given that the 
LensQuery for finished queries are immutable. Would like you hear your views 
before proceeding further.


- Srikanth


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52119/#review149951
-----------------------------------------------------------


On Sept. 21, 2016, 2:14 p.m., Srikanth Sundarrajan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52119/
> -----------------------------------------------------------
> 
> (Updated Sept. 21, 2016, 2:14 p.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1335
>     https://issues.apache.org/jira/browse/LENS-1335
> 
> 
> Repository: lens
> 
> 
> Description
> -------
> 
> NullPointerException in LensClient::getResults(QueryHandle query)
> 
> 
> Diffs
> -----
> 
>   lens-cli/src/test/java/org/apache/lens/cli/TestLensQueryCommands.java 
> e75fc0e 
>   lens-client/src/main/java/org/apache/lens/client/LensClient.java 593cc08 
> 
> Diff: https://reviews.apache.org/r/52119/diff/
> 
> 
> Testing
> -------
> 
> Modified tests to avoid using offending method.
> 
> 
> Thanks,
> 
> Srikanth Sundarrajan
> 
>

Reply via email to