mirror of https://github.com/apache/nifi.git
NIFI-8300 Make non-source processors invalid if scheduled for Primary Node only
This closes #4913. Signed-off-by: Mark Payne <markap14@hotmail.com>
This commit is contained in:
parent
446401b6f1
commit
fedeafb43f
|
@ -1090,6 +1090,13 @@ public class StandardProcessorNode extends ProcessorNode implements Connectable
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure that execution node will not be misused
|
||||
if (getExecutionNode() == ExecutionNode.PRIMARY && hasIncomingConnection()) {
|
||||
results.add(new ValidationResult.Builder()
|
||||
.explanation("Processors with incoming connections cannot be scheduled for Primary Node Only.")
|
||||
.subject("Execution Node").valid(false).build());
|
||||
}
|
||||
} catch (final Throwable t) {
|
||||
LOG.error("Failed to perform validation", t);
|
||||
results.add(new ValidationResult.Builder().explanation("Failed to run validation due to " + t.toString())
|
||||
|
|
Loading…
Reference in New Issue