全部產品
Search
文件中心

Simple Log Service:split_shard

更新時間:Jun 30, 2024

調用CLI命令分裂指定Logstore的Shard。

請求文法

aliyunlog log split_shard --project_name=<value> --logstore_name=<value> --shardId=<value> --split_hash=<value> [--access-id=<value>] [--access-key=<value>] [--sts-token=<value>] [--region-endpoint=<value>] [--client-name=<value>] [--jmes-filter=<value>] [--format-output=<value>] [--decode-output=<value>]

請求參數

該命令的必選和特有參數描述如下。

參數名稱

數實值型別

是否必選

樣本值

描述

--project_name

String

aliyun-test-project

Project名稱。

--logstore_name

String

logstore-b

Logstore名稱。

--shardId

Integer

0

Shard ID。

--split_hash

String

40000000000000000000000000000000

分裂位置。

關於該命令的全域參數,請參見全域參數

樣本

  • 請求樣本

    將預設帳號下logstore-b的Shard進行分裂。

    aliyunlog log split_shard --project_name="aliyun-test-project" --logstore_name="logstore-b" --shardId=0 --split_hash=40000000000000000000000000000000
  • 返回樣本

    [
      {
        "createTime": 1614750027,
        "exclusiveEndKey": "80000000000000000000000000000000",
        "inclusiveBeginKey": "00000000000000000000000000000000",
        "shardID": 0,
        "status": "readonly"
      },
      {
        "createTime": 1622087815,
        "exclusiveEndKey": "40000000000000000000000000000000",
        "inclusiveBeginKey": "00000000000000000000000000000000",
        "shardID": 2,
        "status": "readwrite"
      },
      {
        "createTime": 1622087815,
        "exclusiveEndKey": "80000000000000000000000000000000",
        "inclusiveBeginKey": "40000000000000000000000000000000",
        "shardID": 3,
        "status": "readwrite"
      }
    ]

錯誤碼

如果返回報錯資訊,請參見具體介面的錯誤碼處理。更多資訊,請參見SplitShard錯誤碼處理

API參考

SplitShard