Data Partition

Create

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

Create a set of data partition.

Parameters
Parameter Type Description
count int the num of dataPartitions will be create
name string the name of vol

Get

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

Get information of the specified data partition.

Parameters
Parameter Type Description
id uint64 the id of data partition

response

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

Decommission

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

Remove the replica of data partition, and create new replica asynchronous.

Parameters
Parameter Type Description
id uint64 the id of data partition
addr string the addr of replica which will be decommission

Load

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

Send load task to the dataNode which data partition locate on, then check the crc of each file in the data partition asynchronous.

Parameters
Parameter Type Description
id uint64 the id of data partition

Offline Disk

curl -v "http://10.196.59.198:17010/disk/decommission?addr=10.196.59.201:17310&disk=/cfs1"

Synchronously offline all the data partitions on the disk, and create a new replica for each data partition in the cluster.

Parameters
Parameter Type Description
addr string replica address
disk string disk path