> On Nov. 4, 2015, 3:51 p.m., Puneet Gupta wrote: > > lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java, > > line 1249 > > <https://reviews.apache.org/r/39911/diff/1/?file=1114914#file1114914line1249> > > > > What happens to skipped(open) sessions ? do we need to close them later > > once query execution is over ? > > Deepak Barr wrote: > I think we can rely of hive server to clean it up eventually. > > Puneet Gupta wrote: > Not sure if that will be OK. Can someone comment form Hive perspective.. > Will lot open(skipped) hive sessions form lens create issues while > creating new Hive sessions? > What is the timeout for Hive sessions in production? > > Incase its Not Ok form Hive prespective, we might have to inititiate > periodic cleanup on lens side. (If not periodic, it can also be triggeregd > when any query is purged. Not very relaible though) > Only other problem would be server restart. Where do we store the open > hive sessions details ? We might have to serailize that info too. > > We an take this up separately also if required and close this issue.
Hive does not do any cleanup of sessions. This will lead to session leaks and Memory pile up on hive. We should take care of closing the hive sessions when all its queries are completed. - Amareshwari ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/39911/#review105069 ----------------------------------------------------------- On Nov. 8, 2015, 6:58 p.m., Deepak Barr wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/39911/ > ----------------------------------------------------------- > > (Updated Nov. 8, 2015, 6:58 p.m.) > > > Review request for lens. > > > Repository: lens > > > Description > ------- > > OperationHandle-HiveSession mapping is maintained for all active operations. > Now, hive session will only be closed when there are no active operations > running on that session. > > > Diffs > ----- > > lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java > c96ef20 > > lens-server/src/test/java/org/apache/lens/server/query/TestQueryService.java > c37b0ed > > Diff: https://reviews.apache.org/r/39911/diff/ > > > Testing > ------- > > Yes. > > 1. Created session. > 2. Fired a query. > 3. Deleted the session before query finishes. > 4. Query keeps running and finishes eventually. > > > Thanks, > > Deepak Barr > >