@Override protected boolean cancelRunningOperators(final boolean mayInterruptIfRunning) { boolean cancelled = false; final Iterator<ConcurrentHashMap<ChunkFutureTask,ChunkFutureTask>> fitr = operatorFutures.values().iterator(); while (fitr.hasNext()) { final ConcurrentHashMap<ChunkFutureTask,ChunkFutureTask> set = fitr.next(); for(ChunkFutureTask f : set.keySet()) { /* * Note: This can wind up setting the interrupt status on the * thread in which it is called. For example, SLICE will call * halt(), which calls AbstractRunningQuery#cancel(), which * calls this method. Since the SliceOp() is still running it's * future will be cancelled here. The code in * AbstractRunningQuery#cancel() needs to be robust in the face * of that interrupt. */ if (f.cancel(mayInterruptIfRunning)) cancelled = true; } } return cancelled; }
if (map != null) { for (ChunkFutureTask cft : map.keySet()) { if (cft.isDone()) { cft = new ChunkFutureTask( new ChunkTask(bundle.bopId, bundle.shardId, naccepted, isLastInvocation, source));
if (map != null) { for (ChunkFutureTask cft : map.keySet()) { if (cft.isDone()) { cft = new ChunkFutureTask( new ChunkTask(bundle.bopId, bundle.shardId, naccepted, isLastInvocation, source));
@Override protected boolean cancelRunningOperators(final boolean mayInterruptIfRunning) { boolean cancelled = false; final Iterator<ConcurrentHashMap<ChunkFutureTask,ChunkFutureTask>> fitr = operatorFutures.values().iterator(); while (fitr.hasNext()) { final ConcurrentHashMap<ChunkFutureTask,ChunkFutureTask> set = fitr.next(); for(ChunkFutureTask f : set.keySet()) { /* * Note: This can wind up setting the interrupt status on the * thread in which it is called. For example, SLICE will call * halt(), which calls AbstractRunningQuery#cancel(), which * calls this method. Since the SliceOp() is still running it's * future will be cancelled here. The code in * AbstractRunningQuery#cancel() needs to be robust in the face * of that interrupt. */ if (f.cancel(mayInterruptIfRunning)) cancelled = true; } } return cancelled; }