Data Shard Management

Create

curl -v "http://10.196.59.198:17010/dataPartition/create?count=400&name=test"

Creates a specified number of data shards.

Parameter List

ParameterTypeDescription
countintNumber of data shards to create
namestringVolume name

Query

curl -v "http://10.196.59.198:17010/dataPartition/get?id=100"  | python -m json.tool

Displays detailed information about the data shard, including the number of replicas, volume information, etc.

Parameter List

ParameterTypeDescription
iduint64Data shard ID

Response Example

{
    "PartitionID": 100,
    "LastLoadedTime": 1544082851,
    "ReplicaNum": 3,
    "Status": 2,
    "Replicas": {},
    "Hosts": {},
    "Peers": {},
    "Zones": {},
    "MissingNodes": {},
    "VolName": "test",
    "VolID": 2,
    "FileInCoreMap": {},
    "FilesWithMissingReplica": {}
}

Decommission Replica

curl -v "http://10.196.59.198:17010/dataPartition/decommission?id=13&addr=10.196.59.201:17310"

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

Parameter List

ParameterTypeDescription
iduint64Data shard ID
addrstringAddress of the replica to be removed

Compare Replica Files

curl -v "http://10.196.59.198:17010/dataPartition/load?id=1"

Sends a task to compare the replica files for each replica of the data shard, and then asynchronously checks whether the file CRC on each replica is consistent.

Parameter List

ParameterTypeDescription
iduint64Data shard ID
Edit on GitHub