nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ald...@apache.org
Subject [nifi-minifi-cpp] branch master updated: MINIFICPP-744: Add aliases within c2 responses
Date Fri, 01 Mar 2019 02:31:02 GMT
This is an automated email from the ASF dual-hosted git repository.

aldrin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git


The following commit(s) were added to refs/heads/master by this push:
     new 07e420c  MINIFICPP-744: Add aliases within c2 responses
07e420c is described below

commit 07e420cc725592ffc6a494dc0e5ef453c89d439b
Author: Marc Parisi <phrocker@apache.org>
AuthorDate: Tue Feb 26 21:01:15 2019 -0500

    MINIFICPP-744: Add aliases within c2 responses
    
    This closes #490.
    
    Signed-off-by: Aldrin Piri <aldrin@apache.org>
---
 libminifi/src/c2/ControllerSocketProtocol.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libminifi/src/c2/ControllerSocketProtocol.cpp b/libminifi/src/c2/ControllerSocketProtocol.cpp
index d4f3970..99f2a24 100644
--- a/libminifi/src/c2/ControllerSocketProtocol.cpp
+++ b/libminifi/src/c2/ControllerSocketProtocol.cpp
@@ -258,11 +258,11 @@ int16_t ControllerSocketProtocol::heartbeat(const C2Payload &payload)
{
   if (server_socket_ == nullptr)
     return 0;
   const std::vector<C2ContentResponse> &content = payload.getContent();
-  for (const auto pc : payload.getNestedPayloads()) {
-    if (pc.getLabel() == "metrics") {
-      for (const auto metrics_payload : pc.getNestedPayloads()) {
-        if (metrics_payload.getLabel() == "QueueMetrics") {
-          for (const auto queue_metrics : metrics_payload.getNestedPayloads()) {
+  for (const auto &pc : payload.getNestedPayloads()) {
+    if (pc.getLabel() == "flowInfo" || pc.getLabel() == "metrics") {
+      for (const auto &metrics_payload : pc.getNestedPayloads()) {
+        if (metrics_payload.getLabel() == "QueueMetrics" || metrics_payload.getLabel() ==
"queues") {
+          for (const auto &queue_metrics : metrics_payload.getNestedPayloads()) {
             auto metric_content = queue_metrics.getContent();
             for (const auto &payload_content : queue_metrics.getContent()) {
               uint64_t size = 0;


Mime
View raw message