Reputation: 6342
I have an Ignite Cluster with 10 nodes, I have a partitioned cache, 2 backups. For a given cache entry, i would like to know which nodes doesn't this entry reside in?
Looks the command line interface(ignitevisorcmd.sh
) doesn't provide this functionality.
Upvotes: 0
Views: 696
Reputation: 8390
This is how you can get primary node for a key:
Affinity affinity = ignite.affinity("my-cache");
ClusterNode primary = affinity.mapKeyToNode(key);
Affinity
API has also bunch of other methods that allow to manually calculate affinity (partition numbers, node mappings, etc).
Upvotes: 1
Reputation: 623
I had asked a similar question. You can go through it at this link:
Putting cache entries to specific Ignite Server
I think there is no way to find out the Ignite Server on which an entry resides. But, if your use case is to execute some computation in that specific grid, you can make use of Affinity Call in the Ignite Compute Grid or use invoke an Entry processor on that key.
Upvotes: 0