Cluster

Overview

curl -v "http://10.196.59.198:17010/admin/getCluster" | python -m json.tool

Display the base information of the cluster, such as the detail of metaNode, dataNode, vol and so on.

response

{
    "Name": "test",
    "LeaderAddr": "10.196.59.198:17010",
    "DisableAutoAlloc": false,
    "Applied": 225,
    "MaxDataPartitionID": 100,
    "MaxMetaNodeID": 3,
    "MaxMetaPartitionID": 1,
    "DataNodeStatInfo": {},
    "MetaNodeStatInfo": {},
    "VolStatInfo": {},
    "BadPartitionIDs": {},
    "BadMetaPartitionIDs": {},
    "MetaNodes": {},
    "DataNodes": {}
}

Freeze

curl -v "http://10.196.59.198:17010/cluster/freeze?enable=true"

If cluster is freezed, the vol never allocates dataPartitions automatically.

Parameters
Parameter Type Description
enable bool if enable is true, the cluster is freezed

Statistics

curl -v "http://10.196.59.198:17010/cluster/stat"

Show cluster space information by zone.

response

Topology

curl -v "http://10.196.59.198:17010/topo/get"

Show cluster topology information by zone.

response

[
    {
        "Name": "zone1",
        "Status": "available",
        "NodeSet": {
            "700": {
                "DataNodeLen": 0,
                "MetaNodeLen": 0,
                "MetaNodes": [],
                "DataNodes": []
            }
        }
    },
    {
        "Name": "zone2",
        "Status": "available",
        "NodeSet": {
            "800": {
                "DataNodeLen": 0,
                "MetaNodeLen": 0,
                "MetaNodes": [],
                "DataNodes": []
            }
        }
    }
]

Update Zone

curl -v "http://10.196.59.198:17010/zone/update?name=zone1&enable=false"

Set the status of the zone to available or unavailable.

Parameters
Parameter Type Description
name string zone name
enable bool if enable is true, the cluster is available

Get Zone

curl -v "http://10.196.59.198:17010/zone/list"

Get name and status of all zones.

response

[
    {
        "Name": "zone1",
        "Status": "available",
        "NodeSet": {}
    },
    {
        "Name": "zone2",
        "Status": "available",
        "NodeSet": {}
    }
]