You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Navis Ryu <na...@nexr.com> on 2014/03/04 09:01:23 UTC

Re: Review Request 15873: Query cancel should stop running MR tasks


> On Feb. 27, 2014, 11:08 p.m., Thejas Nair wrote:
> > ql/src/java/org/apache/hadoop/hive/ql/DriverContext.java, line 110
> > <https://reviews.apache.org/r/15873/diff/3/?file=478815#file478815line110>
> >
> >     When pollFinished is running, this shutdown() function will not be able to make progress. Which means that the query cancellation will happen only after a task (could be an MR task) is complete.
> >     
> >     It seems synchronizing around shutdown should be sufficient, either by making it volatile or having synchronized methods around it.
> >     
> >     Since thread safe concurrent collection classes are being used here, I don't see other concurrency issues that would make it necessary to make all these functions synchronized. 
> >     
> >     
> >

It just only polls status of running tasks and goes into wait state quite quickly, so it would not hinder shutdown process. Furthermore, two threads, polling and shutdown, has a race condition on both collections, runnable and running, so those should be guarded by shared something.


- Navis


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15873/#review35625
-----------------------------------------------------------


On Feb. 27, 2014, 7:06 a.m., Navis Ryu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15873/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2014, 7:06 a.m.)
> 
> 
> Review request for hive.
> 
> 
> Bugs: HIVE-5901
>     https://issues.apache.org/jira/browse/HIVE-5901
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Currently, query canceling does not stop running MR job immediately.
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/Driver.java 6705ec4 
>   ql/src/java/org/apache/hadoop/hive/ql/DriverContext.java c51a9c8 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/ConditionalTask.java 854cd52 
>   ql/src/java/org/apache/hadoop/hive/ql/exec/TaskRunner.java ead7b59 
> 
> Diff: https://reviews.apache.org/r/15873/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Navis Ryu
> 
>