Metadata Shard Management

Create

curl -v "http://192.168.0.1:17010/metaPartition/create?count=10&name=test"

Batch create meta partitions.

Parameter List

ParameterTypeDescription
namestringVolume name
countuint64Number of newly added mp

Query

curl -v "http://192.168.0.1:17010/metaPartition/get?id=1" | python -m json.tool

Displays detailed information about the metadata shard, including the shard ID, the starting range of the shard, etc.

Parameter List

ParameterTypeDescription
iduint64Metadata shard ID

Response Example

{
    "PartitionID": 1,
    "Start": 0,
    "End": 9223372036854776000,
    "MaxNodeID": 1,
    "VolName": "test",
    "Replicas": {},
    "ReplicaNum": 3,
    "Status": 2,
    "IsRecover": true,
    "Hosts": {},
    "Peers": {},
    "Zones": {},
    "MissNodes": {},
    "LoadResponse": {}
}

Decommission Replica

curl -v "http://192.168.0.1:17010/metaPartition/decommission?id=13&addr=10.196.59.202:17210"

Removes a replica of the metadata shard and creates a new replica.

Parameter List

ParameterTypeDescription
iduint64Metadata partition ID
addrstringAddress of the replica to be removed

Compare Replica

curl -v "http://192.168.0.1:17010/metaPartition/load?id=1"

Sends a task to compare the replica to each replica, and then checks whether the CRC of each replica is consistent.

Parameter List

ParameterTypeDescription
iduint64Metadata partition ID
Edit on GitHub