Motivation

  1. Currently segment admin rest APIs are mixed with table admin rest APIs, and the documents for the APIs do not match the actual behavior.
  2. Segment toggle (enable/disable) should not be allowed as LLC real-time segment manager and rebalancer won't work properly with segments manually turned OFFLINE in ideal state.
  3. Segment deletion should not be allowed via GET request.
  4. Support batch segment deletion (right now we only support single delete/delete all).

New APIs

The following requests can take a query parameter "type" (OFFLINE or REALTIME) for table type. The request will be performed to tables that match the table name and type.
E.g. "foobar_OFFLINE" matches: ("foobar_OFFLINE", null), ("foobar_OFFLINE", OFFLINE), ("foobar", null), ("foobar", OFFLINE);
"foobar_OFFLINE" does not match: ("foo", null), ("foobar_REALTIME", null), ("foobar_REALTIME", OFFLINE), ("foobar_OFFLINE", REALTIME).

Requests with optional "type":

Requests with mandatory "type":

The following response example are from the table of HybridClusterIntergationTest.

GET /segments/{tableName}

GET /segments/{tableName}/servers

GET /segments/{tableName}/crc

GET /segments/{tableName}/{segmentName}/metadata

POST /segments/{tableName}/{segmentName}/reload

POST /segments/{tableName}/reload

POST /segments/{tableName}/delete

DELETE /segments/{tableName}/{segmentName}

DELETE /segments/{tableName}

Deprecated APIs

Deprecated APIs are still supported for backward-compatible, except for the un-intended behavior of segment toggle (enable/disable/drop).

Here is the map from deprecated APIs to new APIs. The response format for APIs might now be identical to the old ones, so when migrating old APIs to new APIs, adjust the response parsing code accordingly.

The deprecated APIs are subject to be removed in the next release.

Other Segment Level APIs (Unchanged)

Backward-incompatible Changes

Segment toggle (including enable/disable/drop) support is removed.