[ 
https://issues.apache.org/jira/browse/LENS-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16132917#comment-16132917
 ] 

Rajat Khandelwal commented on LENS-1461:
----------------------------------------

bq. session timeout for lens and hive are 1 day and 3 days respectievely. For a 
session which is 2 days old session manager returns valid object for 
HiveSession but its no longer a instance of "LensSessionImpl" since lens 
session already expired. causing downcasting to initialize lens related member 
variable(LensSessionHandle, db, username, password etc) to null causing 
deserializer to fail for them.

Not sure what you mean by this here. By my understanding, when {{LensServices}} 
is {{init}}ed, {{CLIService}} and {{CLIService.SessionManager}} are also 
{{init}}ed. In the {{init}} phase of {{SessionManager}}, session impl class is 
decided. That is configured to be {{LensSessionImpl.class}} in all the restarts 
of the Lens Server. 

What I am worried about though, is why the function 
{{org.apache.lens.server.api.session.SessionService#restoreSession}} has no 
usages in the project. 

bq. 2. downcasting is done in getsession() method in *LensSessionImpl* and 
referenced at lot of places. That might be causing other bugs apart from 
mentioned above. 

I assume you are talking about 
{{org.apache.lens.server.BaseLensService#getSession}}. {{getSession}} has 
another problem, it is throwing Jersey client exception. That exception is fine 
if it ends up to user facing api classes. But it's wrong if it is being thrown 
inside init/start phases. The two kind of usages' need to be served by two 
different functions. 


> Lens services state are not persisted correctly
> -----------------------------------------------
>
>                 Key: LENS-1461
>                 URL: https://issues.apache.org/jira/browse/LENS-1461
>             Project: Apache Lens
>          Issue Type: Bug
>          Components: server
>            Reporter: Ankit Kailaswar
>            Assignee: Ankit Kailaswar
>
> Lens services state are not persisted correctly causing lens  to fail at 
> startup.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to