Skip to content

Commit

Permalink
NIFI-8300 Make non-source processors invalid if scheduled for Primary…
Browse files Browse the repository at this point in the history
… Node only

This closes apache#4913.

Signed-off-by: Mark Payne <markap14@hotmail.com>
  • Loading branch information
s9514171 authored and krisztina-zsihovszki committed Jun 27, 2022
1 parent 877cded commit 1c27f2d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,13 @@ protected Collection<ValidationResult> computeValidationErrors(final ValidationC
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())
Expand Down

0 comments on commit 1c27f2d

Please sign in to comment.