NIFI-730: do not interrupt swap thread if drop flowfiles is canceled

This commit is contained in:
Mark Payne 2015-10-16 09:06:13 -04:00
parent b8dbd1018c
commit 2b4999c018
2 changed files with 0 additions and 10 deletions

View File

@ -29,7 +29,6 @@ public class DropFlowFileRequest implements DropFlowFileStatus {
private volatile QueueSize currentSize;
private volatile QueueSize droppedSize = new QueueSize(0, 0L);
private volatile long lastUpdated = System.currentTimeMillis();
private volatile Thread executionThread;
private volatile String failureReason;
private DropFlowFileState state = DropFlowFileState.WAITING_FOR_LOCK;
@ -101,20 +100,12 @@ public class DropFlowFileRequest implements DropFlowFileStatus {
this.lastUpdated = System.currentTimeMillis();
}
void setExecutionThread(final Thread thread) {
this.executionThread = thread;
}
synchronized boolean cancel() {
if (this.state == DropFlowFileState.COMPLETE || this.state == DropFlowFileState.CANCELED) {
return false;
}
this.state = DropFlowFileState.CANCELED;
if (executionThread != null) {
executionThread.interrupt();
}
return true;
}
}

View File

@ -1051,7 +1051,6 @@ public final class StandardFlowFileQueue implements FlowFileQueue {
t.setDaemon(true);
t.start();
dropRequest.setExecutionThread(t);
dropRequestMap.put(requestIdentifier, dropRequest);
return dropRequest;