mirror of https://github.com/apache/nifi.git
NIFI-4969 Fixing error when importing versioned flow with a processor that uses event driven scheduling. This closes #2539
This commit is contained in:
parent
d14229e440
commit
f1d7518547
|
@ -627,7 +627,8 @@ public class StandardProcessorNode extends ProcessorNode implements Connectable
|
|||
throw new IllegalStateException("Cannot modify Processor configuration while the Processor is running");
|
||||
}
|
||||
if (taskCount < 1 && getSchedulingStrategy() != SchedulingStrategy.EVENT_DRIVEN) {
|
||||
throw new IllegalArgumentException();
|
||||
throw new IllegalArgumentException("Cannot set Concurrent Tasks to " + taskCount + " for component "
|
||||
+ getIdentifier() + " because Scheduling Strategy is not Event Driven");
|
||||
}
|
||||
if (!isTriggeredSerially()) {
|
||||
concurrentTaskCount.set(taskCount);
|
||||
|
|
|
@ -4072,8 +4072,6 @@ public final class StandardProcessGroup implements ProcessGroup {
|
|||
processor.setAnnotationData(proposed.getAnnotationData());
|
||||
processor.setBulletinLevel(LogLevel.valueOf(proposed.getBulletinLevel()));
|
||||
processor.setComments(proposed.getComments());
|
||||
processor.setMaxConcurrentTasks(proposed.getConcurrentlySchedulableTaskCount());
|
||||
processor.setExecutionNode(ExecutionNode.valueOf(proposed.getExecutionNode()));
|
||||
processor.setName(proposed.getName());
|
||||
processor.setPenalizationPeriod(proposed.getPenaltyDuration());
|
||||
|
||||
|
@ -4082,6 +4080,8 @@ public final class StandardProcessGroup implements ProcessGroup {
|
|||
processor.setRunDuration(proposed.getRunDurationMillis(), TimeUnit.MILLISECONDS);
|
||||
processor.setSchedulingStrategy(SchedulingStrategy.valueOf(proposed.getSchedulingStrategy()));
|
||||
processor.setScheduldingPeriod(proposed.getSchedulingPeriod());
|
||||
processor.setMaxConcurrentTasks(proposed.getConcurrentlySchedulableTaskCount());
|
||||
processor.setExecutionNode(ExecutionNode.valueOf(proposed.getExecutionNode()));
|
||||
processor.setStyle(proposed.getStyle());
|
||||
processor.setYieldPeriod(proposed.getYieldDuration());
|
||||
processor.setPosition(new Position(proposed.getPosition().getX(), proposed.getPosition().getY()));
|
||||
|
|
Loading…
Reference in New Issue