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




lens-cli/src/main/java/org/apache/lens/cli/commands/BaseLensCommand.java (line 
92)
<https://reviews.apache.org/r/44305/#comment183644>

    I think this change is redundant. 
    
    Shell has beans, instances of `LensQueryCommand, Lens...Command` etc. Each 
instance inherits from `BaseLensCommand`, which has a `lensClient` instance 
obtained from singleton wrapper. So all the beans have their own instance of 
`LensClient`, but the instance is same thanks to singleton wrapper. 
    
    So at this line, `getClientWrapper().getClient()` should be same as 
`lensClient`. 
    
    That explained, please look into `closeConnection` function since it will 
be called by all the beans on the same instance. Multiple calls to 
`closeConnection` should not be affecting the state of the CLI.


- Rajat Khandelwal


On March 3, 2016, 6:05 a.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44305/
> -----------------------------------------------------------
> 
> (Updated March 3, 2016, 6:05 a.m.)
> 
> 
> Review request for lens.
> 
> 
> Bugs: lens-853
>     https://issues.apache.org/jira/browse/lens-853
> 
> 
> Repository: lens
> 
> 
> Description
> -------
> 
> Setting isConnectionActive flag in setClient method instead of in getClient
> closeConnection should close lensclient instead of singleton lens client
> 
> 
> Diffs
> -----
> 
>   lens-cli/src/main/java/org/apache/lens/cli/commands/BaseLensCommand.java 
> 0c10198 
>   
> lens-cli/src/test/java/org/apache/lens/cli/TestLensConnectionCliCommands.java 
> 558e97f 
>   
> lens-server/src/main/java/org/apache/lens/server/session/SessionResource.java 
> ac77418 
> 
> Diff: https://reviews.apache.org/r/44305/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Raju Bairishetti
> 
>

Reply via email to