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




lens-cli/src/main/java/org/apache/lens/cli/commands/BaseLensCommand.java (line 
80)
<https://reviews.apache.org/r/45099/#comment187351>

    Should we move this method to LensClientSingletonWrapper ?
    
    We can add one more method and users can choose which one to use.
    
    New method : LensClientSingletonWrapper.getClient(boolean 
closeClientOnExit) 
    
    Exiting method LensClientSingletonWrapper.getClient() will call 
    getClient(true) //default behaviour is close on exit
    
    If it makes sense we can do this as part of another JIRA, the current 
changes look fine for this JIRA.



lens-cli/src/main/java/org/apache/lens/cli/commands/BaseLensCommand.java (line 
81)
<https://reviews.apache.org/r/45099/#comment187354>

    Do u think we need to synchronoize ?
    
    From what I know synchronization will not be required since commands can 
not be created parallay on cli.


- Puneet Gupta


On March 21, 2016, 11:47 a.m., Raju Bairishetti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45099/
> -----------------------------------------------------------
> 
> (Updated March 21, 2016, 11:47 a.m.)
> 
> 
> Review request for lens, Amareshwari Sriramadasu and Rajat Khandelwal.
> 
> 
> Bugs: lens-991
>     https://issues.apache.org/jira/browse/lens-991
> 
> 
> Repository: lens
> 
> 
> Description
> -------
> 
> Shutdown hook was getting called for each lens **command bean** whenver we do 
> ctrl+c on cli.
> 
> 
> Diffs
> -----
> 
>   lens-cli/src/main/java/org/apache/lens/cli/commands/BaseLensCommand.java 
> be1ca12 
>   src/site/apt/user/client-config.apt 714db18 
> 
> Diff: https://reviews.apache.org/r/45099/diff/
> 
> 
> Testing
> -------
> 
> **Before applying patch:**
> 
> lens-shell>show cubes
> No cube found
> lens-shell>show params
> ...
> lens-shell>Exception in thread "Thread-3" java.lang.IllegalStateException: 
> Unable to close lens connection with params 
> LensConnectionParams{dbName='default', baseUrl='http://0.0.0.0:9999/lensapi', 
> user=anonymous, lensConfs={}, lensVars={}, sessionVars={}}
>       at org.apache.lens.client.LensConnection.close(LensConnection.java:206)
>       at 
> org.apache.lens.client.LensClient.closeConnection(LensClient.java:326)
>       at 
> org.apache.lens.cli.commands.BaseLensCommand.closeClientConnection(BaseLensCommand.java:92)
>       at 
> org.apache.lens.cli.commands.BaseLensCommand$2.run(BaseLensCommand.java:81)
> LZDLocalAdmins-MacBook-Pro-2:client rajubairishetti$
>     
>     
>     
> **After aplying patch:**
> 
> lens-shell>show cubes
> No cube found
> lens-shell>show params
> ...
> lens-shell>LZDLocalAdmins-MacBook-Pro-2:client rajubairishetti$
> 
> 
> Thanks,
> 
> Raju Bairishetti
> 
>

Reply via email to