You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mc...@apache.org on 2015/02/04 20:04:54 UTC
incubator-nifi git commit: NIFI-250: - Invoking the appropriate save
when updating controller services.
Repository: incubator-nifi
Updated Branches:
refs/heads/NIFI-250 6b91546d9 -> 3425dee1f
NIFI-250:
- Invoking the appropriate save when updating controller services.
Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/3425dee1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/3425dee1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/3425dee1
Branch: refs/heads/NIFI-250
Commit: 3425dee1f2aca679235b434b40bb49be8099ff55
Parents: 6b91546
Author: Matt Gilman <ma...@gmail.com>
Authored: Wed Feb 4 14:04:38 2015 -0500
Committer: Matt Gilman <ma...@gmail.com>
Committed: Wed Feb 4 14:04:38 2015 -0500
----------------------------------------------------------------------
.../nifi/web/StandardNiFiServiceFacade.java | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/3425dee1/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
index 41cdb58..f953585 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiServiceFacade.java
@@ -1289,8 +1289,10 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade {
final Revision updatedRevision = updateRevision(revision);
final ConfigurationSnapshot<ControllerServiceDTO> response = new ConfigurationSnapshot<>(updatedRevision.getVersion(), dtoFactory.createControllerServiceDto(controllerService));
- // save the flow on the node
- if (properties.isNode()) {
+ // save the update
+ if (properties.isClusterManager()) {
+ clusterManager.saveControllerServices();
+ } else {
controllerFacade.save();
}
@@ -1313,8 +1315,10 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade {
final Revision updatedRevision = updateRevision(revision);
final ConfigurationSnapshot<ControllerServiceDTO> response = new ConfigurationSnapshot<>(updatedRevision.getVersion(), dtoFactory.createControllerServiceDto(controllerService));
- // save the flow
- if (properties.isNode()) {
+ // save the update
+ if (properties.isClusterManager()) {
+ clusterManager.saveControllerServices();
+ } else {
controllerFacade.save();
}
@@ -1333,8 +1337,10 @@ public class StandardNiFiServiceFacade implements NiFiServiceFacade {
final Revision updatedRevision = updateRevision(revision);
final ConfigurationSnapshot<Void> response = new ConfigurationSnapshot<>(updatedRevision.getVersion());
- // save the flow
- if (properties.isNode()) {
+ // save the update
+ if (properties.isClusterManager()) {
+ clusterManager.saveControllerServices();
+ } else {
controllerFacade.save();
}