Can we understand usecases of this api? Why is LensClient.isConnectionOpen required? Are we suggesting users should call this for any api call? If that is required, for every call user has to do two round trips to server.
Right now, all api takes session handle and returns 410 if session is expired - upon which user can open a new session and try the call again. I think that is a better option than providing an api for is current session valid or not. I see there is already some discussion on https://issues.apache.org/jira/browse/LENS-794 regarding this. Please check if it makes sense. Thanks Amareshwari On Mon, Nov 2, 2015 at 7:22 PM, Pranav Kumar Agarwal <[email protected]> wrote: > Hi All, > > I can see LensClient.isConnectionOpen just checks if the connection was > ever established with the LensServer. However in my opinion it should > rather make a call to Session service and then check if the Hive session is > still valid in HiveSessionService.java. > > Also, In HiveSessionService I can see that removal of the key from > SESSION_MAP happens only when an explicit call to closeSession is made, so > isOpen method in HiveSessionService won't work as is, but we should rather > query cliService to verify if the session is indeed valid. > > Thoughts? > > If there are no objections to the proposed change in behavior then I'll > file the jira. > > Regards, > -Pranav. >
