Explain the /state

curl http://am4:6080/state
I get this result

{
"counter": "751418",
"groups": {
    "1": {
        "members": {
            "3": {
                "id": "3",
                "groupId": 1,
                "addr": "am3:7080",
                "leader": true,
                "lastUpdate": "1528363033"
            }
        },
        "tablets": {
            "_share_hash_": {
                "groupId": 1,
                "predicate": "_share_hash_",
                "force": true,
                "space": "70"
            },
            "dummy": {
                "groupId": 1,
                "predicate": "dummy",
                "force": true,
                "space": "17"
            },
            "point": {
                "groupId": 1,
                "predicate": "point",
                "space": "9895029"
            }
        }
    },
    "2": {
        "members": {
            "1": {
                "id": "1",
                "groupId": 2,
                "addr": "am1:7080",
                "leader": true,
                "lastUpdate": "1528363055"
            }
        },
        "tablets": {
            "died": {
                "groupId": 2,
                "predicate": "died",
                "force": true,
                "space": "16"
            },
            "ipname": {
                "groupId": 2,
                "predicate": "ipname",
                "space": "7618815"
            }
        }
    },
    "3": {
        "members": {
            "2": {
                "id": "2",
                "groupId": 3,
                "addr": "am2:7080",
                "leader": true,
                "lastUpdate": "1528363096"
            }
        },
        "tablets": {
            "_predicate_": {
                "groupId": 3,
                "predicate": "_predicate_",
                "space": "10076693"
            }
        }
    },
    "4": {
        "members": {
            "4": {
                "id": "4",
                "groupId": 4,
                "addr": "am4:7080",
                "leader": true,
                "lastUpdate": "1528450504"
            }
        },
        "tablets": {
            "hostname": {
                "groupId": 4,
                "predicate": "hostname",
                "space": "8164830"
            }
        }
    }
},
"zeros": {
    "1": {
        "id": "1",
        "addr": "am4:5080",
        "leader": true
    }
},
"maxLeaseId": "540000",
"maxTxnTs": "1740000"
}

there are something i want to know,
what ‘counters’ means in the first line ?
what’s ‘groups’ mean? I have known about ,dgraph have group, just like if i have six dgraph server instance and set replicas for 3 then I will have 2 groups, But in my test cluster I have set replicas for 1 what’s the groups consist of 4 members mean?
then what the meaning of ‘groupId,leader,lastUpdate’?
why tablets have a predicated named 'share_hash ’ and ‘dummy’ . I am sure I never set this predicate. ? what’s the ‘groupId’ in tablets mean?
last question how tablets balance during the cluster?

  1. counter : i don’t konw what the exactly number means

  2. groups: it means how many groups your data distribute in dgraph, i guss you had four dgraph servers, and you set replicas for 1, and then each dgraph server is in a single group so that’s why you have 4 groups.

  3. groupid: its the number for each group, leader means this server is now the controller, other servers are follower and need to sync data with leader

  4. share_hash ’ and ‘dummy are the predicates used inside, it’s not decided by user

  5. you should know how dgraph it works and then you will know the answer for the last question, but it’s not necessary to do.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.