Denis,
Actually. I still do not understand.
Reading back thru all of the codeā¦
All of the Javadoc seem to indicate that what I am trying to do should work.
public interface ComputeTask<T, R> extends Serializable {
/**
* @param subgrid Nodes available for this task execution. Note that
order of nodes is
* guaranteed to be randomized by container. This ensures that
every time
* you simply iterate through grid nodes, the order of nodes will
be random which
* over time should result into all nodes being used equally.
*/
IgniteCompute
/**
* You can also get an instance of {@link IgniteCompute} over a subset of
cluster nodes, i.e. over
* a {@link ClusterGroup}:
* <pre name="code" class="java">
* // Cluster group composed of all remote nodes.
* ClusterGroup rmtGrp = ignite.cluster().forRemotes();
*
* // Compute over remote nodes only.
* IgniteCompute c = ignite.compute(rmtGrp);
IgniteCompute
/**
* Executes given task within the cluster group.
*/
@IgniteAsyncSupported
public <T, R> R execute(ComputeTask<T, R> task, @Nullable T arg) throws
IgniteException;
ALL of these methods indicate that the Task should be executed ONLY on the
ClusterGroup.
So why is that not happening??
Ignite is using ALL Nodes. Not just the ones in my ClusterGroup
My sequence is as follow.
1) managedIgnite.getCompute().withTimeout(timeout).execute(computeTask,
quoteRequest);
2) public IgniteCompute getCompute() {
ClusterGroup readyNodes =
readyForComputeMonitor.getNodesReadyForCompute(ignite.cluster());
return ignite.compute(readyNodes);
3) public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode>
subgrid, @Nullable TRequest request) throws IgniteException {
Map<ComputeJob, ClusterNode> jobMap = new HashMap<>();
try {
List<UUID> cacheKeys = getIgniteAffinityCacheKeys(request);
Map<ClusterNode, Collection<UUID>> nodeToKeysMap =
ignite.<UUID>affinity(getIgniteAffinityCacheName()).mapKeysToNodes(cacheKeys);
for (Map.Entry<ClusterNode, Collection<UUID>> mapping :
nodeToKeysMap.entrySet()) {
By my read. This should work with the ClusterGroup I have provided.
Thanks,
-- Chris
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/