Hello,
Yes, your question makes a lot of sense. Unfortunately, this capability does not exist yet in JPPF, however I have registered a feature request for it:
2575515 - Control which driver a node connects toCurrently, I believe the functionality you are looking for could be implemented in a different way, using a single driver for all the nodes, some manipulation of the nodes' configuration and
execution policies for the jobs you submit.
The approach would be as follows:
- using a single driver, with all the nodes connected to this driver
- each node would have a "jobID" property in its configuration
- when you submit a job, you associate it with an execution policy, such as:
<ExecutionPolicy>
<Equal>
<Property>jobID</Property>
<Value>myJobID</Value>
</Equal>
</ExecutionPolicy>
This way you ensure that the job is executed only on the nodes with a matching jobID.
- now the issue is how to tell each node to switch to another jobID. The first thing is to modify the jobID in the node's configuration. This can be done by sending it a task that will do a JPPFConfiguration.getProperties().setProperty("jobID", "myNewJobID"). The second problem to solve is how to ensure that this task is sent to the right node?
For this you will need a unique identifier for each node, that you can use in an execution policy. Let's say that we use the node's IP address as an identifier. We could write an execution policy such as:
<ExecutionPolicy>
<Contains ignoreCase="true">
<Property>ipv4.addresses</Property>
<Value>my.node.ip.address</Value>
</Contains>
</ExecutionPolicy>
Then, what you can do is, for each of the nodes involved, send a job that contains only one task that modifies the jobID in the node's configuration, associated with this execution policy.
[/list]I understand this is a little on the heavy side, but I believe it will do the job.
I hope this helps,
-Laurent