Vinz2168 opened a new pull request, #11807: URL: https://github.com/apache/nifi/pull/11807
# Summary [NIFI-16456](https://issues.apache.org/jira/browse/NIFI-16456) The MiNiFi Java C2 heartbeat only reports processors, connection queues and bulletins that belong directly to the root Process Group. Any component placed inside a nested Process Group is invisible to the C2 server, even though C2 operations such as `START`/`STOP` on `PROCESSOR` already work on nested processors. `C2NifiClientService` calls `EventAccess.getGroupStatus("root")`, which already computes the full status tree (`recursiveStatusDepth = Integer.MAX_VALUE` in `AbstractEventAccess`), but only reads the first level: - `getProcessorStatus()` reads `getProcessorStatus()` of the root group only - `getQueueStatus()` reads `getConnectionStatus()` of the root group only - `getBulletins()` filters bulletins with `groupIdMatches(<root group id>)`, so bulletins from processors in nested groups are dropped This change walks the already computed `ProcessGroupStatus` tree (root plus all descendants) for processor and queue status, and removes the root group filter from the processor bulletin query. No protocol change is needed: `ProcessorStatus` and `ProcessorBulletin` already carry `groupId`, so C2 servers can tell where each component lives. No additional status computation is introduced; the bulletin query also no longer needs a separate `getGroupStatus` call. Verified with a MiNiFi assembly built from this branch, connected to a test C2 server, using a flow with 2 processors / 1 connection in the root group and 3 processors / 2 connections in a child Process Group (one of them logging at WARN level): - without the change: heartbeat with 2 processors, 1 queue, 0 processor bulletins - with the change: heartbeat with 5 processors, 3 queues and the WARN bulletins of the nested processor, each entry carrying the child group id # Tracking Please complete the following tracking steps prior to pull request creation. ### Issue Tracking - [x] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created ### Pull Request Tracking - [x] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000` - [x] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000` - [x] Pull request contains [commits signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) with a registered key indicating `Verified` status ### Pull Request Formatting - [x] Pull Request based on current revision of the `main` branch - [x] Pull Request refers to a feature branch with one commit containing changes # Verification Please indicate the verification steps performed prior to pull request creation. ### Build - [x] Build completed using `./mvnw clean install -P contrib-check` - [x] JDK 21 - [ ] JDK 25 ### Licensing - [ ] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html) - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files ### Documentation - [ ] Documentation formatting appears as expected in rendered files 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
