Keston375 opened a new issue, #14896: URL: https://github.com/apache/pinot/issues/14896
# Title Enhancement: Introduce Generic Utility Method for Persisting Task Metadata in ZNodes ## Repository Version [release-0.8.0](https://github.com/apache/pinot/releases/tag/release-0.8.0) ## Key Words / Search Terms MinionTaskMetadataUtils, persist, task metadata, ZNode, generic utility method, abstract class ## Description The existing `MinionTaskMetadataUtils` class contains multiple `persist` methods, such as `persistMergeRollupTaskMetadata` and `persistRealtimeToOfflineSegmentsTaskMetadata`, which perform similar operations for persisting task metadata into ZNodes. This redundancy leads to code duplication and increased maintenance efforts. To address this, a generic utility method and an abstract class have been introduced to handle the persistence of task metadata uniformly. The specific `persist` methods have been removed, and their respective callers have been migrated to utilize the new generic method, streamlining the codebase and enhancing maintainability. ## Expected Behavior - A single, generic utility method should handle the persistence of various types of task metadata into ZNodes. - The introduction of an abstract class should provide a standardized framework for task metadata persistence operations. - Existing code that previously relied on specific `persist` methods should be refactored to use the new generic method, reducing redundancy and simplifying future maintenance. ## Current Behavior - Multiple `persist` methods in `MinionTaskMetadataUtils` perform similar tasks, leading to code duplication. - The lack of a generic utility method results in repetitive code patterns for persisting different types of task metadata. - Maintaining and updating task metadata persistence logic is cumbersome due to the scattered and redundant implementations. ## Use Cases / Motivating Examples (for Feature Requests) - Simplifying the codebase by consolidating repetitive `persist` methods into a single, generic utility function. - Enhancing code maintainability by introducing an abstract class that standardizes task metadata persistence operations. - Facilitating easier future extensions and modifications to task metadata persistence logic without the need to alter multiple specific methods. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
