You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by pv...@apache.org on 2020/06/26 14:49:08 UTC

[nifi] branch master updated: NIFI-6163 Reporting task cannot be set to running when in INVALID state

This is an automated email from the ASF dual-hosted git repository.

pvillard pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/master by this push:
     new a2c88bc  NIFI-6163 Reporting task cannot be set to running when in INVALID state
a2c88bc is described below

commit a2c88bc98fb937eedf50dbb998a87727a98f04f7
Author: Makarov Vasily <fe...@gmail.com>
AuthorDate: Mon Jun 15 09:55:53 2020 +0300

    NIFI-6163 Reporting task cannot be set to running when in INVALID state
    
    Signed-off-by: Pierre Villard <pi...@gmail.com>
    
    This closes #4334.
---
 .../apache/nifi/controller/reporting/AbstractReportingTaskNode.java   | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/reporting/AbstractReportingTaskNode.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/reporting/AbstractReportingTaskNode.java
index 469edfb..d43c049 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/reporting/AbstractReportingTaskNode.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/reporting/AbstractReportingTaskNode.java
@@ -256,6 +256,10 @@ public abstract class AbstractReportingTaskNode extends AbstractComponentNode im
         if (isRunning()) {
             throw new IllegalStateException("Cannot start " + getReportingTask().getIdentifier() + " because it is already running");
         }
+
+        if (getValidationStatus() == ValidationStatus.INVALID) {
+            throw new IllegalStateException("Cannot start " + getReportingTask().getIdentifier() + " because it is in INVALID status");
+        }
     }
 
     @Override