valepakh commented on code in PR #3104:
URL: https://github.com/apache/ignite-3/pull/3104#discussion_r1469323177


##########
modules/compute/src/main/java/org/apache/ignite/internal/compute/IgniteComputeInternal.java:
##########
@@ -17,16 +17,45 @@
 
 package org.apache.ignite.internal.compute;
 
+import java.util.List;
+import java.util.Set;
 import java.util.UUID;
 import java.util.concurrent.CompletableFuture;
+import org.apache.ignite.compute.ComputeJob;
+import org.apache.ignite.compute.DeploymentUnit;
 import org.apache.ignite.compute.IgniteCompute;
+import org.apache.ignite.compute.JobExecution;
+import org.apache.ignite.compute.JobExecutionOptions;
 import org.apache.ignite.compute.JobStatus;
+import org.apache.ignite.network.ClusterNode;
 import org.jetbrains.annotations.Nullable;
 
 /**
  * Internal compute facade.
  */
 public interface IgniteComputeInternal extends IgniteCompute {
+    /**
+     * Executes a {@link ComputeJob} of the given class on a single node. If 
the node leaves the cluster, it will be restarted on one of the
+     * candidate nodes.
+     *
+     * @param <R> Job result type.
+     * @param targetNode Node to execute the job on.
+     * @param candidates Candidate nodes; In case target node left the 
cluster, the job will be restarted on one of them.
+     * @param units Deployment units. Can be empty.
+     * @param jobClassName Name of the job class to execute.
+     * @param options Job execution options.
+     * @param args Arguments of the job.
+     * @return CompletableFuture Job result.
+     */
+    <R> JobExecution<R> executeAsyncWithFailover(
+            ClusterNode targetNode,
+            Set<ClusterNode> candidates,

Review Comment:
   > Do we really need to pass instances of `Set` around in the internal API? 
`List` is more efficient and easier.
   
   In this case `Set` seems to be more efficient since public API uses it as 
well and we could just pass it further.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to