Skip to content

[client] Support specifying rack when adding/removing server tags in Admin API #2889

@LiebingYu

Description

@LiebingYu

Search before asking

  • I searched in the issues and found nothing similar.

Description

Task Overview:

Currently, Admin.addServerTag() and Admin.removeServerTag() only support specifying tablet servers by their server IDs. This task introduces two new overloaded methods that allow users to target all tablet servers belonging to a specific rack in a single call.

Purpose:

In production environments, the rack attribute of a ServerNode typically represents a physical machine (or a physical rack of machines). A common operational scenario is decommissioning a physical host — which may run multiple tablet servers — and marking all of them as PERMANENT_OFFLINE or TEMPORARY_OFFLINE at once.

Without rack-based targeting, operators must:

  1. Call Admin.getServerNodes() to retrieve all server nodes.
  2. Manually filter the results by the target rack.
  3. Extract the server IDs.
  4. Call addServerTag() / removeServerTag() with those IDs.

This is repetitive, error-prone, and adds unnecessary boilerplate in automation scripts. A dedicated rack-based API makes the decommissioning workflow concise and intuitive.

Willingness to contribute

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions