[40/50] nifi git commit: NIFI-4969 Fixing error when importing versioned flow with a processor that uses event driven scheduling. This closes #2539

2018-05-10 Thread aldrin
NIFI-4969 Fixing error when importing versioned flow with a processor that uses 
event driven scheduling. This closes #2539


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/79e4402e
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/79e4402e
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/79e4402e

Branch: refs/heads/HDF-3.1-maint
Commit: 79e4402e22fbbdd68418f6257da2637f82c75aa3
Parents: 4adb5b7
Author: Bryan Bende 
Authored: Tue Mar 13 12:42:33 2018 -0400
Committer: Matt Gilman 
Committed: Tue Mar 13 13:33:50 2018 -0400

--
 .../java/org/apache/nifi/controller/StandardProcessorNode.java   | 3 ++-
 .../main/java/org/apache/nifi/groups/StandardProcessGroup.java   | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/79e4402e/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java
--
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java
index 187b62f..4ce9420 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java
@@ -621,7 +621,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);

http://git-wip-us.apache.org/repos/asf/nifi/blob/79e4402e/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
--
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
index 4177917..f0b7b3e 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
@@ -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()));



nifi git commit: NIFI-4969 Fixing error when importing versioned flow with a processor that uses event driven scheduling. This closes #2539

2018-03-13 Thread mcgilman
Repository: nifi
Updated Branches:
  refs/heads/master d14229e44 -> f1d751854


NIFI-4969 Fixing error when importing versioned flow with a processor that uses 
event driven scheduling. This closes #2539


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/f1d75185
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/f1d75185
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/f1d75185

Branch: refs/heads/master
Commit: f1d7518547c0a5d1c4a6a47cbf1c4c54e68164e6
Parents: d14229e
Author: Bryan Bende 
Authored: Tue Mar 13 12:42:33 2018 -0400
Committer: Matt Gilman 
Committed: Tue Mar 13 13:15:24 2018 -0400

--
 .../java/org/apache/nifi/controller/StandardProcessorNode.java   | 3 ++-
 .../main/java/org/apache/nifi/groups/StandardProcessGroup.java   | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/nifi/blob/f1d75185/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java
--
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java
index c6d62a2..c3a8f5c 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java
@@ -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);

http://git-wip-us.apache.org/repos/asf/nifi/blob/f1d75185/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
--
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
index 4177917..f0b7b3e 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/groups/StandardProcessGroup.java
@@ -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()));