public interface ComputeJobResult
ComputeTask.result(ComputeJobResult, List)
method.Modifier and Type | Method and Description |
---|---|
<T> T |
getData()
Gets data returned by remote job if it didn't fail.
|
IgniteException |
getException()
Gets exception produced by execution of remote job, or
null if
remote execution finished normally and did not produce any exceptions. |
<T extends ComputeJob> |
getJob()
Gets local instance of remote job returned by
ComputeTask.map(List, Object) method. |
ComputeJobContext |
getJobContext()
Gets job context.
|
ClusterNode |
getNode()
Gets node this job executed on.
|
boolean |
isCancelled()
Gets job cancellation status.
|
ComputeJobContext getJobContext()
<T> T getData()
ComputeJob.execute()
method.
Note that if task is annotated with ComputeTaskNoResultCache
annotation,
then job results will not be cached and will be available only in
ComputeTask.result(ComputeJobResult, List)
method for every individual job,
but not in ComputeTask.reduce(List)
method. This feature was added to
avoid excessive storing of overly large results.
T
- Type of the return value returning from ComputeJob.execute()
method.ComputeJob.execute()
method if it didn't fail.IgniteException getException()
null
if
remote execution finished normally and did not produce any exceptions.IgniteException
produced by execution of remote job or null
if
no exception was produced.
Note that if remote job resulted in RuntimeException
or Error
then they will be wrapped into ComputeUserUndeclaredException
returned by this method.
If job on remote node was rejected (cancelled while it was on waiting queue), then
ComputeExecutionRejectedException
will be returned.
If node on which job was computing failed, then ClusterTopologyException
is
returned.
<T extends ComputeJob> T getJob()
ComputeTask.map(List, Object)
method.T
- Type of ComputeJob
that was sent to remote node.ComputeTask.map(List, Object)
method.ClusterNode getNode()
boolean isCancelled()
true
if job received cancellation
request on remote node. Note that job, after receiving cancellation request, will still
need to finish and return, hence getData()
method may contain
execution result even if the job was canceled.
Job can receive cancellation request if the task was explicitly cancelled
from future (see IgniteFuture.cancel()
) or if task completed prior
to getting results from all remote jobs.
true
if job received cancellation request and false
otherwise.
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024