> On Nov. 13, 2015, 6:57 a.m., Pranav Agarwal wrote: > > lens-driver-hive/src/main/java/org/apache/lens/driver/hive/HiveDriver.java, > > line 1245 > > <https://reviews.apache.org/r/39911/diff/2/?file=1119315#file1119315line1245> > > > > In my opinion we shouldn't change the default behavior of this API. > > Since the user asked to close the session this semantic implies that the > > underying queries should be killed. > > > > If we want to address the usecase of closing the session that are > > inactive and are not running any queries then driver should have an API to > > return the running queries for a session. And the caller should make a call > > whether they want to first check if there are any running queries in the > > driver before calling closeSession.
I was wondering when user has issued an "asynchronous" query, why should the user wait till the query finishes (sometimes more than a day). He can close the cli/session and come back later and check the status or kill the query or do other operations available via query handle. Keeping the session open when a user doesn't intend to do any further oprations other than just waiting for the async query result, can be wastage of resources for lens server. When a sync query is issued, the behaviour can be different, if really required. - Puneet ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/39911/#review106370 ----------------------------------------------------------- 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 > >