ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blasteralfred <blasteralf...@gmail.com>
Subject How to create class affinity?
Date Mon, 24 Apr 2017 21:02:53 GMT

I have 3 java classes ClassA, ClassB, ClassC.

	int idA;
	String stringA;
	public ClassA(){}
	public ClassA(int idA,String stringA){
	public int getidA(){
		return idA;
	public String getstringA(){
		return stringA;

	int idB;
	String stringB;
	public ClassB(){}
	public ClassB(int idB,String stringB){
	public int getidB(){
		return idB;
	public String getstringB(){
		return stringB;

	int idC,idB;
	String stringC;
	public ClassC(){}
	public ClassB(int idB,int idC,String stringC){
	public int getidC(){
		return idC;
	public String getstringC(){
		return stringC;

I want ClassA in replicated mode and B & C in partitioned mode. ClassC is
related to ClassB. The id of ClassB is present in ClassC (acting like a
foreign key). Say, I have 3 nodes, 30 ClassA objects, 30 ClassB objects and
30 ClassC objects. They are distributed in nodes like below;

Node 1 => ClassA->30, ClassB->10,ClassC->8
Node 2 => ClassA->30, ClassB->5,ClassC->3
Node 3 => ClassA->30, ClassB->15,ClassC->19

Objects of ClassC related to ClassB should present in same node. I know that
there is some mechanism AffinityKey, but I don't know how to implement this.
Could somebody tell me how to do this?

Thanks in advance..

View this message in context: http://apache-ignite-users.70518.x6.nabble.com/How-to-create-class-affinity-tp12211.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message