All Products
Search
Document Center

Simple Log Service:SplitShard

更新時間:Nov 28, 2024

Splits a shard in the readwrite state.

Operation description

Usage notes

  • Host consists of a project name and a Simple Log Service endpoint. You must specify a project in Host.
  • Each shard has an MD5 hash range, and each range is a left-closed, right-open interval. The interval is in the [BeginKey,EndKey) format. A shard can be in the readwrite or readonly state. You can split a shard and merge shards. For more information, see Shard .

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

POST /logstores/{logstore}/shards/{shard}?action=split HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
projectstringYes

The name of the project.

ali-test-project
logstorestringYes

The name of the Logstore.

logstorename
shardintegerYes

The ID of the shard.

0
keystringNo

The position where the shard is split.

ef000000000000000000000000000000
shardCountintegerNo

The number of new shards that are generated after splitting.

2

Response parameters

ParameterTypeDescriptionExample
headersobject
Serverstring

The name of the server.

nginx
Content-Typestring

The content type of the response body. Valid values: application/json and application/x-protobuf.

application/json
Content-Lengthstring

The content length of the response body.

20
Connectionstring

Indicates whether the connection is persistent. Valid values:

  • close: The connection is non-persistent. A new TCP connection is established for each HTTP request.
  • keep-alive: The connection is persistent. After a TCP connection is established, the connection remains open, and no more time or bandwidth is consumed to establish new connections.
close
Datestring

The time when the response was returned.

Sun, 27 May 2018 08:25:04 GMT
x-log-requestidstring

The request ID.

5B0A6B60BB6EE39764D458B5
array

The shards that are returned. For example, if the shardCount parameter is set to 2, an array that consists of three shards is returned. The first shard is the original shard, and the last two shards are the new shards.

shard

The shard information.

Examples

Sample success responses

JSONformat

[
  {
    "shardID": 0,
    "status": "readwrite",
    "inclusiveBeginKey": "00000000000000000000000000000000",
    "exclusiveEndKey": "8000000000000000000000000000000",
    "serverIp": "203.0.113.10",
    "createTime": 1524222931
  }
]

Error codes

For a list of error codes, visit the Service error codes.