Chris, I lost track of our discussion, because this part of your system seems to be too overarchitectured. Can you provide a short summary of what you are trying to achieve?
The main thing that I don't understand is why you need a *map* method? This method is supposed to be used as a part of a map-reduce pipeline. It is aimed to split one big task into many small jobs. Looks like you are trying to miss-use it to implement some kind of affinityRun, that is already available in Ignite: https://apacheignite.readme.io/docs/affinity-collocation#section-collocating-compute-with-data Another thing is that you are using a stateful cluster group predicate, which already smells fishy. Normally it should be stateless, because there are no guarantees, when it will be evaluated. And potentially it can be sent over network to other nodes. So, let's try to solve your problem the easiest way possible, without all this affinity-map-cluster-continuous-query-predicate madness :) Denis пн, 4 дек. 2017 г. в 9:34, Chris Berry <[email protected]>: > Hi, > > This is a continuation of this Thread, which has gone stale… > > http://apache-ignite-users.70518.x6.nabble.com/ComputeTask-is-including-Nodes-for-ComputeJobs-prematurely-td18185.html > > That Thread is concerned with Ignite sending ComputeJobs to Nodes > prematurely. > > As suggested in that Thread, I am now creating the IgniteCompute with a > ClusterGroup. > Like this > > ClusterGroup readyNodes = > readyForComputeMonitor.getNodesReadyForCompute(ignite.cluster()); > return ignite.compute(readyNodes); > > where getNodesReadyForCompute is > > public ClusterGroup getNodesReadyForCompute(IgniteCluster cluster) { > return cluster.forPredicate((node) -> > isNodeReadyForCompute(node)); > } > > But this does not work as advertised!! > > I can see unequivocally that ALL Nodes the Grid are receiving ComputeJobs > as > soon as the partitions are balanced. > Even when a Node is NOT in the ClusterGroup. > (I can prove this with the logs) > > Is this a bug in Ignite?? > It does not appear to be honoring the ClusterGroup?? > > The scenario is as follows. > > I have 12 Nodes in the Grid. And thus, 12 in the ClusterGroup. > (There is 1 Primary and 1 Backup of all data. So when I kill a Node the > data > is definitely on another Node) > I kill one Node. And now, there are only 11 in the ClusterGroup. > Another Node comes online – and as soon as it is fully registered in Ignite > that new Node starts to see ComputeJobs > Even though the ClusterGroup still has only 11 entries in it. And does NOT > include the new Node. > > It seems that there is either a bug in Ignite?? > Or perhaps I do not have things wired up properly?? > > It is my understanding that Ignite will send load to either the Primary or > the Backup?? > > Could someone please enlighten me?? > > THANKS, > -- Chris > > > > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >
