[ 
https://issues.apache.org/jira/browse/BLUR-46?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13528616#comment-13528616
 ] 

Aaron McCurry commented on BLUR-46:
-----------------------------------

First I think that this is the 0.2-dev code (which should work), I still need 
to merge the 0.2-dev-removing-old-thrift branch into 0.2-dev.  If you take a 
look at the 0.2-dev-removing-old-thrift branch the BlurServer isn't implemented 
at all.

But to answer your question how the _interrupted / _running AtomicBooleans 
cancel the query (this may give you some ideas on how to implement it in the 
0.2-dev-removing-old-thrift branch).  First the _interrupted is just used for 
status, everything is actually keyed off the _running AtomicBoolean.

There are two different places where it is used.
1) Inside a IndexReader to have the query.rewrite exit if the _running is set 
to false.
2) Inside a collector that exits during query execution if the _running is set 
to false.

The _running is created inside the query() method in the IndexManager and is 
passed into the various objects that need a reference to it.

Aaron
                
> Implement cancelQuery
> ---------------------
>
>                 Key: BLUR-46
>                 URL: https://issues.apache.org/jira/browse/BLUR-46
>             Project: Apache Blur
>          Issue Type: Improvement
>    Affects Versions: 0.2.0
>         Environment: 0.2-dev-removing-old-thrift branch
>            Reporter: Aaron McCurry
>             Fix For: 0.2.0
>
>
> Implement the ability to cancel any currently running queries via 
> cancelQuery.  The thrift api will likely evolve during implementation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to