文档

split_shard

更新时间:

调用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_nameStringaliyun-test-projectProject名称。
--logstore_nameStringlogstore-bLogstore名称。
--shardIdInteger0Shard ID。
--split_hashString40000000000000000000000000000000分裂位置。
关于该命令的全局参数,请参见全局参数

示例

  • 请求示例
    将默认账号下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

  • 本页导读 (1)
文档反馈