Skip to content

[client] Expose all coordinator servers (leader and standbys) via the client API - #4391

Open
MaheshS08 wants to merge 4 commits into
apache:mainfrom
MaheshS08:br_4117
Open

MaheshS08 wants to merge 4 commits into
apache:mainfrom
MaheshS08:br_4117

Conversation

@MaheshS08

Copy link
Copy Markdown
Contributor

Purpose

Linked issue: close #4117

Brief change log

  • Introduced a CoordinatorRole enum (LEADER / STANDBY) to distinguish coordinator roles.
  • Extended PbCoordinatorServerInfo in the metadata proto to carry coordinator role and liveness status, and included this in MetadataResponse.
  • Updated server-side metadata assembly to read all registered coordinators from ZooKeeper (/coordinators/ids), cross-referencing the active leader path (/coordinators/active) to assign roles.
  • Added a liveness check for standby coordinators based on their presence/registration in the leader election group.
  • Added a new Admin#describeCoordinators() API that returns all coordinators (leader and standbys) with their role and liveness status.

Tests

  • Modified ZookeeperClientTest

API and Format

  • Public API addition: New Admin#describeCoordinators() method returning the full coordinator HA topology (leader + standbys, with role and liveness). This is additive — no existing API signatures change.
  • Wire format change: MetadataResponse / PbCoordinatorServerInfo gains new fields (coordinator role, liveness). Backward compatible — new fields are additive, and older clients/servers can ignore them.

@MaheshS08

Copy link
Copy Markdown
Contributor Author

@affo , could you please review this PR?

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.

[client] Expose all coordinator servers (leader and standbys) via the client API

1 participant