Hi, @Andy You running a 32 bit JVM? yes You are trying to stop a long running query from another thread? yes
My usecase is that I am trying to write a jena plugin for Rapidminer. What that means is that I have gui components representing "sparql query", "sparql service query", "open tdb", "constant model",.. and stick their inputs/outputs together to form a rapidminer-process. And these processes can be halted (from the gui), which Rapidminer does by calling Thread.interrupt(), so in essence I don't have full control over the execution/interruptions. I can understand/empathize not supporting Thread.interrupt(), but once the system is inconsistent can I recover somehow? -Simon On Thu, Apr 25, 2013 at 1:13 PM, Andy Seaborne <[email protected]> wrote: > Simon, > > You running a 32 bit JVM? > You are trying to stop a long running query from another thread? > > > On 19/04/13 11:55, Simon Sperl wrote: > >> Hi, >> >> what I do: >> open a TDBFactory.createDataset() >> run a sparql query that runs a long time >> then the execution gets interrupted by a Thread.Interrupt exception. >> > > Why is the thread being killed with Thread.Interrupt? Killing threads > this way is not supported - it is likely to put the internal state of the > system into an inconsistent state. > > Jena ARQ supports clean to stop queries via QueryExecution.abort() and > also via query timeouts. > > /** Stop in mid execution. > * This method can be called in parallel with other methods on the > * QueryExecution object. > * There is no guarantee that the concrete implementation actual > * will stop or that it will do so immediately. > * No operations on the query execution or any associated > * result set are permitted after this call and may cause exceptions to > be thrown. > */ > > This works by calling down the stack of operations currently executing the > query and allows them to exit at the first moment they are able to. > Interrupting OS system calls is not supported. > > Andy > >
