[FLINK-39176][runtime] Introduce NodeHealthManager abstraction#27701
Open
featzhang wants to merge 1 commit intoapache:masterfrom
Open
[FLINK-39176][runtime] Introduce NodeHealthManager abstraction#27701featzhang wants to merge 1 commit intoapache:masterfrom
featzhang wants to merge 1 commit intoapache:masterfrom
Conversation
This PR introduces the NodeHealthManager abstraction layer for the upcoming generic blacklist feature. Changes: - Add NodeHealthManager interface with methods for checking node health, marking nodes as quarantined, removing quarantine, listing all statuses, and cleaning up expired entries - Add NodeHealthStatus data class to hold node health information - Add NoOpNodeHealthManager implementation that always considers nodes healthy (no-op implementation for backward compatibility) - Add DefaultNodeHealthManager implementation using ConcurrentHashMap to manage node health states - Integrate NodeHealthManager into ResourceManager with NoOpNodeHealthManager as the default implementation (no behavior change in this PR) - Add comprehensive unit tests for all implementations This is the first phase of the generic blacklist feature and does not change any existing behavior.
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
This PR introduces the NodeHealthManager abstraction layer as the first phase of implementing a generic blacklist mechanism for compute nodes in Flink. The abstraction allows pluggable node health management strategies while maintaining backward compatibility by defaulting to a No-Op implementation.
Brief change log
NodeHealthManagerinterface to define the contract for node health managementNodeHealthStatusdata class to represent node health informationNoOpNodeHealthManagerthat treats all nodes as healthy (default behavior)DefaultNodeHealthManagerthat manages node health states usingConcurrentHashMapNodeHealthManagerintoResourceManageras a member variableNodeHealthManagerTestVerifying this change
Added
NodeHealthManagerTestwith 9 test cases covering all core functionalitiesTests verify:
All unit tests pass successfully (13 tests)
Does this pull request potentially affect one of the following parts
Documentation
This is an internal refactoring change. No documentation updates are required as the feature is not exposed to users yet. Documentation will be added in subsequent PRs when the blacklist mechanism is fully implemented and exposed to users.