Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINIFICPP-2516 Change C2 runStatus value format to be consistent with NiFi #1921

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions C2.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ configuration produces the following JSON:
"processingNanos": 0,
"activeThreadCount": -1,
"terminatedThreadCount": -1,
"runStatus": "Running"
"runStatus": "RUNNING"
},
{
"id": "4fe2d51d-076a-49b0-88de-5cf5adf52b8f",
Expand All @@ -223,11 +223,11 @@ configuration produces the following JSON:
"processingNanos": 2119148,
"activeThreadCount": -1,
"terminatedThreadCount": -1,
"runStatus": "Running"
"runStatus": "RUNNING"
}
],
"flowId": "96273342-b9fe-11ef-a0ad-10f60a596f64",
"runStatus": "Running"
"runStatus": "RUNNING"
}
},
"LoadMetrics": {
Expand Down Expand Up @@ -550,7 +550,7 @@ Contains information about the flow the agent is running, including the versione
"processingNanos": 0,
"activeThreadCount": -1,
"terminatedThreadCount": -1,
"running": true
"runStatus": "RUNNING"
},
{
"id": "4fe2d51d-076a-49b0-88de-5cf5adf52b8f",
Expand All @@ -565,11 +565,11 @@ Contains information about the flow the agent is running, including the versione
"processingNanos": 2119148,
"activeThreadCount": -1,
"terminatedThreadCount": -1,
"running": true
"runStatus": "RUNNING"
}
],
"flowId": "96273342-b9fe-11ef-a0ad-10f60a596f64",
"running": true
"runStatus": "RUNNING"
}
```

Expand Down
4 changes: 2 additions & 2 deletions libminifi/src/core/state/nodes/FlowInformation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ std::vector<SerializedResponseNode> FlowInformation::serialize() {

if (nullptr != monitor_) {
monitor_->executeOnComponent("FlowController", [&serialized](StateController& component) {
serialized.push_back({.name = "runStatus", .value = (component.isRunning() ? "Running" : "Stopped")});
serialized.push_back({.name = "runStatus", .value = (component.isRunning() ? "RUNNING" : "STOPPED")});
});
}

Expand Down Expand Up @@ -91,7 +91,7 @@ std::vector<SerializedResponseNode> FlowInformation::serialize() {
{.name = "processingNanos", .value = metrics->processing_nanos.load()},
{.name = "activeThreadCount", .value = -1},
{.name = "terminatedThreadCount", .value = -1},
{.name = "runStatus", .value = (processor->isRunning() ? "Running" : "Stopped")}
{.name = "runStatus", .value = (processor->isRunning() ? "RUNNING" : "STOPPED")}
}
});
}
Expand Down
4 changes: 2 additions & 2 deletions libminifi/test/integration/C2MetricsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class MetricsHandler: public HeartbeatHandler {
processor["processingNanos"].GetInt() >= 0 &&
processor["activeThreadCount"].GetInt() == -1 &&
processor["terminatedThreadCount"].GetInt() == -1 &&
processor["runStatus"].GetString() == std::string("Running");
processor["runStatus"].GetString() == std::string("RUNNING");
}

static bool verifyCommonRuntimeMetricNodes(const rapidjson::Value& runtime_metrics, const std::string& queue_id) {
Expand All @@ -151,7 +151,7 @@ class MetricsHandler: public HeartbeatHandler {
runtime_metrics.HasMember("flowInfo") &&
runtime_metrics["flowInfo"].HasMember("flowId") &&
runtime_metrics["flowInfo"].HasMember("runStatus") &&
runtime_metrics["flowInfo"]["runStatus"].GetString() == std::string("Running") &&
runtime_metrics["flowInfo"]["runStatus"].GetString() == std::string("RUNNING") &&
runtime_metrics["flowInfo"].HasMember("versionedFlowSnapshotURI") &&
runtime_metrics["flowInfo"].HasMember("queues") &&
runtime_metrics["flowInfo"]["queues"].HasMember(queue_id) &&
Expand Down