> On Dec. 7, 2015, 7:56 a.m., Rajat Khandelwal wrote: > > lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java, > > line 803 > > <https://reviews.apache.org/r/39911/diff/2-3/?file=1119315#file1119315line803> > > > > If sessions are getting closed at query finish, there shouldn't be any > > orphans now. Let's log the orphans and the cause(if possible) for their > > being orphans. > > Deepak Barr wrote: > The close() method is never called except for some test classes. So I am > not quite sure if there will be orphan sessions. For example, if a query is > running on a orphaned session and driver.close() is called, then we would > want to close the orphaned sessions ( which will also kill the query running > on that session)
Agree with Deepak here. driver.close should not close the sessions, and i think right now, driver.close itself is not called. We can remove session close from here to be consistent with semantics. - Amareshwari ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/39911/#review109130 ----------------------------------------------------------- On Dec. 2, 2015, 10:40 a.m., Deepak Barr wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/39911/ > ----------------------------------------------------------- > > (Updated Dec. 2, 2015, 10:40 a.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 > a84c679 > > lens-driver-hive/src/test/java/org/apache/lens/driver/hive/TestRemoteHiveDriver.java > ab5ada9 > > lens-server/src/test/java/org/apache/lens/server/query/TestQueryService.java > f6693aa > > 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 > >
