Updated on 2025-09-19 GMT+08:00

Querying Redistribution Details

Function

This API is used to query the monitoring information about a cluster, such as the redistribution mode, redistribution progress, and redistribution details.

The redistribution function is available only for DWS 2.0 8.1.1.200 or later. The redistribution progress of data tables is available only for DWS 2.0 8.2.1 or later.

Calling Method

For details, see Calling APIs.

URI

GET /v2/{project_id}/clusters/{cluster_id}/redistribution

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

cluster_id

Yes

String

Definition

Cluster ID. For details about how to obtain the value, see Obtaining the Cluster ID.

Constraints

The value must be a valid DWS cluster ID.

Range

It is a 36-digit UUID.

Default Value

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Definition

Size of each page to be queried.

Constraints

N/A

Range

N/A

Default Value

10

offset

No

Integer

Definition

Page offset, which starts from 0 (page number minus 1).

Constraints

N/A

Range

Greater than or equal to 0

Default Value

0

db_name

No

String

Definition

Database name.

Constraints

N/A

Range

N/A

Default Value

null

table_name

No

String

Definition

Table name.

Constraints

N/A

Range

N/A

Default Value

null

type

No

String

Definition

Type. The value comes from the redistributed column in the public.pgxc_redistb table. Use commas (,) to separate multiple values.

Constraints

N/A

Range

i: Redistribution is in progress.

y: Redistribution is complete.

n: Redistribution is not started.

Default Value

null: no filtering

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

redis_info

RdsRedisInfo object

Definition

Redistribution information.

Range

N/A

schedule_mode

Boolean

Definition

Scheduling mode.

Range

false: non-scheduling mode; true: scheduling mode.

pause_enable

Boolean

Definition

Whether pause is allowed.

Range

false: Pause is not allowed. true: Pause is allowed.

recover_enable

Boolean

Definition

Whether resumption is allowed.

Range

false: Resumption is not allowed. true: Resumption is allowed.

retry_enable

Boolean

Definition

Whether retry is allowed.

Range

false: Retry is not allowed. true: Retry is allowed.

update_enable

Boolean

Definition

Whether update is allowed.

Range

false: Update is not allowed. true: Update is allowed. This parameter applies only to the scheduling mode.

control_enable

Boolean

Definition

Whether control is allowed.

Range

false: Control is not allowed. true: Control is allowed. This parameter applies only to the scheduling mode.

Table 4 RdsRedisInfo

Parameter

Type

Description

id

String

Definition

Redistribution information ID.

Range

N/A

cluster_id

String

Definition

Cluster ID.

Range

N/A

start_time

String

Definition

Start time.

Range

N/A

end_time

String

Definition

End time.

Range

N/A

status

String

Definition

Status.

Range

PREPARE, RUNNING, WAITING, PAUSE, PAUSING, SUCCESS, or FAIL.

redis_conf

RedisConf object

Definition

Redistribution configuration.

Range

N/A

redis_progress

RedisProgress object

Definition

Redistribution progress.

Range

N/A

redis_table_detail

RedisTableDetail object

Definition

Redistribution table information.

Range

N/A

Table 5 RedisConf

Parameter

Type

Description

redis_mode

String

Definition

Redistribution mode.

Range

online or offline.

schedule_conf

ScheduleConf object

Definition

Scheduling configuration information.

Range

N/A

parallel_jobs

Integer

Definition

Redistribution concurrency.

Range

1 to 200

parallel_job

Integer

Definition

Number of concurrent redistribution tasks. This parameter has been deprecated.

Range

1 to 200

priority_policy

String

Definition

Priority policy.

Range

large: Larger tables are redistributed first.

small: Small tables are redistributed first.

default: Tables are distributed in the default sequence.

bucket_split_info

BucketSplitInfo object

Definition

Bucket splitting information.

Range

N/A

Table 6 ScheduleConf

Parameter

Type

Description

schedule_start

String

Definition

Scheduling start time.

Range

N/A

schedule_end

String

Definition

Scheduling end time.

Range

N/A

schedule_type

String

Definition

Scheduling type.

Range

N/A

schedule_date

Array of integers

Definition

Scheduling date.

Range

N/A

schedule_time

Array of strings

Definition

Scheduling time list.

Range

N/A

Table 7 BucketSplitInfo

Parameter

Type

Description

current_dn_num

Integer

Definition

Number of current DNs.

Range

N/A

after_scale_out_dn_num

Integer

Definition

Number of DN nodes after scale-out.

Range

N/A

current_bucket_num

Integer

Definition

Number of current buckets.

Range

N/A

after_scale_out_bucket_num

Integer

Definition

Number of buckets after scale-out.

Range

N/A

is_bucket_split

Boolean

Definition

Whether bucket splitting is involved in scale-out.

Range

N/A

bucket_tilt_rate

String

Definition

Bucket tilt rate on DN nodes. It is used to measure the imbalance of buckets on DN nodes.

Range

N/A

after_scale_out_bucket_tilt_rate

String

Definition

Bucket tilt rate on DN nodes after scale-out. It is used to measure the imbalance of buckets on DN nodes after scale-out.

Range

N/A

Table 8 RedisProgress

Parameter

Type

Description

bytes_done

Long

Definition

Number of completed bytes.

Range

N/A

byte_left

Long

Definition

Number of remaining bytes.

Range

N/A

tables_done

Integer

Definition

Completed tables.

Range

N/A

tables_left

Integer

Definition

Remaining tables.

Range

N/A

table_progress

Integer

Definition

Table redistribution progress.

Range

1 to 100

total_progress

Integer

Definition

Total progress.

Range

1 to 100

redis_rate

String

Definition

Redistribution speed.

Range

N/A

estimated_time

String

Definition

Estimated time.

Range

N/A

completed

Boolean

Definition

Whether the operation is complete.

Range

N/A

initialed

Boolean

Definition

Whether the initialization is complete.

Range

N/A

fail_count

Integer

Definition

Number of failures.

Range

N/A

redistributing

Boolean

Definition

Redistribution result queried by cm_ctl.

Range

N/A

status

String

Definition

Status.

Range

N/A

pause_by_user

Boolean

Definition

Whether the operation is paused by the user.

Range

N/A

Table 9 RedisTableDetail

Parameter

Type

Description

data

Array of RedisTable objects

Definition

Redistribution data.

Range

N/A

total

Integer

Definition

Number of redistributed tables.

Range

N/A

Table 10 RedisTable

Parameter

Type

Description

table_name

String

Definition

Table name.

Range

N/A

id

Integer

Definition

Unique ID of the table.

Range

N/A

schema_name

String

Definition

Schema name.

Range

N/A

logical_cluster_name

String

Definition

Logical cluster name.

Range

N/A

size

Long

Definition

Table size.

Range

N/A

status

String

Definition

Redistribution type.

Range

i: Redistribution is in progress.

y: Redistribution is complete.

n: Redistribution is not started.

Example Requests

Query redistribution details.

GET https://{Endpoint}/v2/89cd04f168b84af6be287f71730fdb4b/clusters/e59d6b86-9072-46eb-a996-13f8b44994c1/redistribution

{
  "redis_mode" : "online",
  "parallel_jobs" : 3
}

Example Responses

Status code: 200

Redistribution details queried.

{
  "error_msg" : null,
  "redis_info" : {
    "id" : "1e1006ae-5243-4989-9452-c0217ad08776",
    "cluster_id" : "37e6956b-17dd-4aef-980d-8ebd9c29f887",
    "start_time" : "2025-05-15 14:04",
    "end_time" : "",
    "status" : "PAUSE",
    "redis_conf" : {
      "redis_mode" : "online",
      "schedule_conf" : null,
      "parallel_jobs" : 4,
      "priority_policy" : "default",
      "bucket_split_info" : {
        "current_dn_num" : 3,
        "after_scale_out_dn_num" : 6,
        "current_bucket_num" : 32,
        "after_scale_out_bucket_num" : 32,
        "is_bucket_split" : false,
        "bucket_tilt_rate" : "9.09%",
        "after_scale_out_bucket_tilt_rate" : "16.67%"
      }
    },
    "redis_progress" : {
      "bytes_done" : 7219200,
      "byte_left" : 0,
      "tables_done" : 95,
      "tables_left" : 230,
      "table_progress" : 29,
      "total_progress" : 31,
      "redis_rate" : "21 MB/s",
      "estimated_time" : "00:12:06",
      "completed" : false,
      "initialed" : true,
      "fail_count" : 0,
      "redistributing" : true,
      "status" : "FAIL",
      "pause_by_user" : false
    },
    "redis_table_detail" : {
      "data" : [ {
        "table_name" : "test_69",
        "id" : 2147492808,
        "schema_name" : "public",
        "logical_cluster_name" : "v3_logical",
        "size" : 77815808,
        "status" : "i"
      }, {
        "table_name" : "test_171",
        "id" : 2147493123,
        "schema_name" : "public",
        "logical_cluster_name" : "v3_logical",
        "size" : 77815808,
        "status" : "i"
      }, {
        "table_name" : "test_236",
        "id" : 2147493327,
        "schema_name" : "public",
        "logical_cluster_name" : "v3_logical",
        "size" : 77815808,
        "status" : "i"
      } ],
      "total" : 3
    }
  },
  "schedule_mode" : false,
  "pause_enable" : false,
  "recover_enable" : true,
  "retry_enable" : false,
  "update_enable" : false,
  "control_enable" : false
}

Status Codes

Status Code

Description

200

Redistribution details queried.

400

Request error.

401

Authentication failed.

403

You do not have required permissions.

404

No resources found.

500

Internal server error.

503

Service unavailable.