primary and other replicas are called backups. Cluster member which owns primary replica of a partition is called partition owner."Q: So will this number show up Management center?
I mean I tried to start 2 JVMs in a cluster, and I see only 135 partitions owned by 1 member and 136 partitions owned by the other.
Why didnt i see 271/271? Is it because the partition aren't full?
Q: You used the term primary partitions and then primary replica, are you talking about the same thing?
Can i say for e.g partition 1 contains pri replicas of data and also possibly backup replica of other partition?
Q: in the e.g it says 68, it means only partitions of primary replicas? or its irrelevant as in 68 partitions is overall number including partitions with backup replica.
Q: Yes i saw that in the document page as well, but it doesn't tell me anything about the pri/backup replicas distribution within?
Say if i insert 10000 objects into the map spread across 6 JVMs, i would probably see that partitions will be divided by 6 in MC.
That's all i can see? I mean it literally means hazelcast would have spread all pri/backup replicas in the partitions evenly?
e,g I cannot tell if say partition 1 with pri replica is in member2, and the backup replica of that partition is in member 4 etc..
Basically viewing the partition table maybe?
Hi again,
Let me clarify the terms "partition" and "replica". Partitions are memory segments that can contain data entries in each. Each Hazelcast partition can have multiple "replicas", which are distributed among the cluster members. One of the replicas becomes the "primary" and other replicas are called "backups". In other words, partitions are data groups where they are kept as replicas in the memory of Hazelcast cluster. Primary replicas are used to perform regular operations, backups are used when primaries are lost. Now, let me try to answer your questions:Q: So will this number show up Management center?
I mean I tried to start 2 JVMs in a cluster, and I see only 135 partitions owned by 1 member and 136 partitions owned by the other.
Why didnt i see 271/271? Is it because the partition aren't full?No, Management Center only shows the number of primary replica counts in the cluster members. So, it is normal to see these numbers.
Q: You used the term primary partitions and then primary replica, are you talking about the same thing?
Can i say for e.g partition 1 contains pri replicas of data and also possibly backup replica of other partition?I think I explained this above. I also need to say that a cluster member can keep either a primary or a backup replica of a specific partition.
Q: in the e.g it says 68, it means only partitions of primary replicas? or its irrelevant as in 68 partitions is overall number including partitions with backup replica.
Yes, it is the number of primary replicas as it is in Management Center.
Q: Yes i saw that in the document page as well, but it doesn't tell me anything about the pri/backup replicas distribution within?
Say if i insert 10000 objects into the map spread across 6 JVMs, i would probably see that partitions will be divided by 6 in MC.
That's all i can see? I mean it literally means hazelcast would have spread all pri/backup replicas in the partitions evenly?
e,g I cannot tell if say partition 1 with pri replica is in member2, and the backup replica of that partition is in member 4 etc..
Basically viewing the partition table maybe?Hazelcast distributes the data using the keys as it is explained here: http://docs.hazelcast.org/docs/latest/manual/html-single/index.html#how-the-data-is-partitionedAnd unfortunately, you cannot see the partition table of cluster using a REST call or something similar. But why do you need to see the owner of the backup partitions? Maybe I can help if I can understand what you aim.
Ed: I see, so if it shows 136/135 for partition count between 2 nodes, it also does not necessary mean that they are all filled up with data correct?
Does it also meant for e.g
node 1: 135 partitions shown + ("the invisible" 136 backup replicas for node2)
node 2: 136 partitions shown + ("the invisible" 135 backup replicas for node1)
Ed: Yes I read the explanation, so in a nutshell, I can depict the following?
e.g
node 1 PartitionX: (pri) node 2 PartitionY: (backup -- also a partition which will not shown up in the MC)
______________________ _____________________
| [data1] - pri replica | | [data1] - backup replica |
| [data2] - pri replica | | [data2] - backup replica |
------------------------------------ ------------------------------------
(this partition does not hold backup replicas)
Ed: OK, so does it mean (271-68) = 203 partitions are empty at the time of query?
And also 68 replica counts (backup count =1) are residing in another node's backup replica.
Ed : As I mentioned, first thing is we wanted to ensure that all the pri/backup replicas are distributed across several nodes/JVMs in a glance.
.eg we set HOST_AWARE in declarative form in the xml file.
Now say I have 4 nodes with 1 hazelcast JVM running in each node. We start them in a cluster and say MC shows 25% for each member in the partition graph in MC.
So what does this tell me? I can say the pri replicas are evenly distributed for sure, so what about the backup replicas?
e.g I can't see like where is the backup replica of partition1 of node1 residing, is it in node2? node3? node4? so if i do shutdowns of nodes to see the HA, can I safely say that we have backups in the correct places and we wont lose anything?
Perhaps I am looking it at the wrong direction, so if you would enlighten me, that will be great.
And also 68 replica counts (backup count =1) are residing in another node's backup replica.
Ed : so for the replica part, is my assumption correct?
Ed: I suppose only java APIs can expose more information?
I also saw in MC, there are entry counts and backup counts per member, do they represent the number of primary partitions and backup paritions?