devmadhuu opened a new pull request, #11768: URL: https://github.com/apache/ozone/pull/11768
## What changes were proposed in this pull request? This PR introduces a standalone Jobworker service and an OM-side framework for coordinating background jobs. It provides reusable registration, heartbeat, command-dispatch and result-reporting infrastructure, allowing job-specific processing to run outside the OM JVM. The implementation follows the generic Jobworker architecture from the [HDDS-16402](https://issues.apache.org/jira/browse/HDDS-16402) reference branch, without including key-migration business logic. ### Main changes - Add the ozone-jobworker-server module and ozone jobworker launcher. - Add gRPC communication for version discovery, worker registration, heartbeats and reports. - Add OM-side worker registration, health tracking, command queues and result listeners. - Add worker-side asynchronous command processing and extensible handler registration. - Integrate startup, shutdown and restart handling with OM. - Add configuration, metrics, audit integration and distribution dependencies. ### OM HA behavior Only the ready OM leader dispatches commands and processes command-status reports. Commands carry the leader’s Ratis term, and workers reject queued commands from terms older than the latest term they have observed. On leadership changes, OM clears queued and in-flight commands and notifies their listeners through timeout callbacks. Owning features are responsible for retaining their business work, implementing idempotent execution and deciding when to resubmit it. Term checks do not cancel an already-running handler or provide exactly-once execution. ### Scope of this PR - The OM Jobworker endpoint is disabled by default and can be enabled with `ozone.om.jobworker.service.enabled=true.` - Jobworkers run as separate JVM processes and are started explicitly using ozone jobworker. - Key-migration commands, lifecycle scheduling, migration task tables and storage-policy placement changes will be done in more follow up PRs. - The transport uses plaintext gRPC; complete worker authentication and authorization are outside the scope of this PR. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-17059 ## How was this patch tested? Test coverage includes: - Worker lifecycle, endpoint state machines, registration and heartbeat handling. - Command queueing, handler execution, status reporting, failures and timeouts. - OM worker registration, health tracking and service cleanup. - Leader-readiness checks, leadership-change cleanup and stale-term handling. - A three-OM integration scenario exercising command dispatch across a leader change. -- 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]
