> On May 5, 2017, 10:17 a.m., Puneet Gupta wrote:
> > lens-client/src/main/java/org/apache/lens/client/LensClient.java
> > Line 161 (original), 169 (patched)
> > <https://reviews.apache.org/r/58986/diff/1/?file=1708224#file1708224line170>
> >
> >     Are we clearing the statementMap at any point ?
> 
> Rajat Khandelwal wrote:
>     No.

Adding one more change: `getStatment` should not fail if the client object 
hasn't been used to fire any queries. So `getStatement` will return 
`getLatestStatement` in such case.


- Rajat


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


On May 4, 2017, 1:30 p.m., Rajat Khandelwal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58986/
> -----------------------------------------------------------
> 
> (Updated May 4, 2017, 1:30 p.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: LENS-1418
>     https://issues.apache.org/jira/browse/LENS-1418
> 
> 
> Repository: lens
> 
> 
> Description
> -------
> 
> Using one lens client to fire two queries in two threads results in 
> discrepencies. LensClient has a {{Map<QueryHandle, LensStatement>}} and also 
> has a cached instance of {{LensStatement}}. When two threads fire queries, 
> both use the same statement object. {{LensStatement}} object in turn caches 
> {{LensQuery}} Object. So whichever thread fired query last is the last one to 
> set lens query inside statement causing 
> {{LensClient.getStatement().getQuery()}} to return that query object for all 
> threads.
> 
> 
> Diffs
> -----
> 
>   lens-client/src/main/java/org/apache/lens/client/LensClient.java 
> e9367988fa780ed0ca3e2a2698226e43c011777f 
> 
> 
> Diff: https://reviews.apache.org/r/58986/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Rajat Khandelwal
> 
>

Reply via email to