nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ald...@apache.org
Subject nifi-minifi-cpp git commit: MINIFI-168: enable minifi cpp agents to be able to receive flow files
Date Tue, 27 Dec 2016 15:39:54 GMT
Repository: nifi-minifi-cpp
Updated Branches:
  refs/heads/master e9cfbfe0f -> 628687280


MINIFI-168: enable minifi cpp agents to be able to receive flow files

This closes #31.

Signed-off-by: Aldrin Piri <aldrin@apache.org>


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

Branch: refs/heads/master
Commit: 628687280b683e9c95cf96b2ae627a835687ac4f
Parents: e9cfbfe
Author: Kathik Narayanan <knarayanan@hortonworks.com>
Authored: Mon Dec 19 14:18:20 2016 -0500
Committer: Aldrin Piri <aldrin@apache.org>
Committed: Tue Dec 27 10:31:54 2016 -0500

----------------------------------------------------------------------
 libminifi/src/FlowController.cpp | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/62868728/libminifi/src/FlowController.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/FlowController.cpp b/libminifi/src/FlowController.cpp
index 6f74373..455788c 100644
--- a/libminifi/src/FlowController.cpp
+++ b/libminifi/src/FlowController.cpp
@@ -566,6 +566,7 @@ void FlowController::parseRemoteProcessGroupYaml(YAML::Node *rpgNode,
ProcessGro
                 _logger->log_debug("parseRemoteProcessGroupYaml: yield period => [%s]",
yieldPeriod.c_str());
 
                 YAML::Node inputPorts = rpgNode["Input Ports"].as<YAML::Node>();
+                YAML::Node outputPorts = rpgNode["Output Ports"].as<YAML::Node>();
                 ProcessGroup *group = NULL;
 
                 // generate the random UUID
@@ -598,7 +599,7 @@ void FlowController::parseRemoteProcessGroupYaml(YAML::Node *rpgNode,
ProcessGro
                 group->setTransmitting(true);
                 group->setURL(url);
 
-                if (inputPorts.IsSequence()) {
+                if (inputPorts && inputPorts.IsSequence()) {
                     for (YAML::const_iterator portIter = inputPorts.begin(); portIter !=
inputPorts.end(); ++portIter) {
                         _logger->log_debug("Got a current port, iterating...");
 
@@ -607,6 +608,16 @@ void FlowController::parseRemoteProcessGroupYaml(YAML::Node *rpgNode,
ProcessGro
                         this->parsePortYaml(&currPort, group, SEND);
                     } // for node
                 }
+                if (outputPorts && outputPorts.IsSequence()) {
+                    for (YAML::const_iterator portIter = outputPorts.begin(); portIter !=
outputPorts.end(); ++portIter) {
+                        _logger->log_debug("Got a current port, iterating...");
+
+                        YAML::Node currPort = portIter->as<YAML::Node>();
+
+                        this->parsePortYaml(&currPort, group, RECEIVE);
+                    } // for node
+                }
+				
             }
         }
     }


Mime
View raw message