Skip to content

NIFI-16456 Include nested Process Groups in MiNiFi C2 heartbeat flow info - #11807

Open
Vinz2168 wants to merge 1 commit into
apache:mainfrom
Vinz2168:NIFI-16456
Open

Vinz2168 wants to merge 1 commit into
apache:mainfrom
Vinz2168:NIFI-16456

Conversation

@Vinz2168

Copy link
Copy Markdown
Contributor

Summary

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

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000
  • Pull request contains commits signed with a registered key indicating Verified status

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • 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

  • Build completed using ./mvnw clean install -P contrib-check
    • JDK 21
    • JDK 25

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

🤖 Generated with Claude Code

@Vinz2168
Vinz2168 marked this pull request as ready for review October 15, 2026 08:15
…info

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Vinz2168

Copy link
Copy Markdown
Contributor Author

Re-pushed (no code changes) to retrigger CI after a transient Maven Central Connection reset while resolving iceberg-api in the code-compliance Validate job, unrelated to this change. All other checks had passed. Could a committer approve the workflow runs? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant