From 2b4999c0185ad6009dda33badfef3ade6cb2fde6 Mon Sep 17 00:00:00 2001 From: Mark Payne Date: Fri, 16 Oct 2015 09:06:13 -0400 Subject: [PATCH] NIFI-730: do not interrupt swap thread if drop flowfiles is canceled --- .../org/apache/nifi/controller/DropFlowFileRequest.java | 9 --------- .../apache/nifi/controller/StandardFlowFileQueue.java | 1 - 2 files changed, 10 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/DropFlowFileRequest.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/DropFlowFileRequest.java index 7eea86ad09..6f55e79fca 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/DropFlowFileRequest.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/controller/DropFlowFileRequest.java @@ -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; } } diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowFileQueue.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowFileQueue.java index a9e80b035f..ddb82256ae 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowFileQueue.java +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardFlowFileQueue.java @@ -1051,7 +1051,6 @@ public final class StandardFlowFileQueue implements FlowFileQueue { t.setDaemon(true); t.start(); - dropRequest.setExecutionThread(t); dropRequestMap.put(requestIdentifier, dropRequest); return dropRequest;