/** {@inheritDoc} */ @Override public void callcc() { if (jobCtx != null) jobCtx.callcc(); }
/** {@inheritDoc} */ @Override public GridComputeJobResultPolicy result(GridComputeJobResult res, List<GridComputeJobResult> rcvd) throws GridException { // No failover for this task. if (res.getException() != null) throw res.getException(); return GridComputeJobResultPolicy.WAIT; }
@Override public void onMasterNodeLeft(GridComputeTaskSession ses) throws GridException { ((GridComputeJobMasterLeaveAware)c).onMasterNodeLeft(ses); } };
/** {@inheritDoc} */ @Override public final Object reduce(List<GridComputeJobResult> results) throws GridException { assert results.size() == 1; GridComputeJobResult res = results.get(0); if (res.getException() != null) throw res.getException(); return res.getData(); } }
/** {@inheritDoc} */ @Override public GridNode failover(GridFailoverContext ctx, List<GridNode> top) { U.warn(log, "Returning 'null' node for failed job (failover will not happen) [job=" + ctx.getJobResult().getJob() + ", task=" + ctx.getTaskSession().getTaskName() + ", sessionId=" + ctx.getTaskSession().getId() + ']'); return null; }
/** {@inheritDoc} */ @Override public Boolean reduce(List<GridComputeJobResult> results) throws GridException { return F.first(results).getData(); } }
/** {@inheritDoc} */ @Override public void cancel() { job.cancel(); }
/** {@inheritDoc} */ @Override public Object execute() throws GridException { return job.execute(); }
@Override public Map<? extends GridComputeJob, GridNode> call() throws GridException { return task.map(shuffledNodes, arg); } });
/** {@inheritDoc} */ @Override public boolean heldcc() { return jobCtx != null && jobCtx.heldcc(); }
@Override public void onMasterNodeLeft(GridComputeTaskSession ses) throws GridException { ((GridComputeJobMasterLeaveAware)c).onMasterNodeLeft(ses); } };
/** {@inheritDoc} */ @Override public GridComputeJobResultPolicy result(GridComputeJobResult res, List<GridComputeJobResult> rcvd) throws GridException { // No failover. if (res.getException() != null) throw res.getException(); return GridComputeJobResultPolicy.WAIT; }
@Override public void run() { job0.cancel(); } });
@Override public void onMasterNodeLeft(GridComputeTaskSession ses) throws GridException { ((GridComputeJobMasterLeaveAware)r).onMasterNodeLeft(ses); } };
@Override public void onMasterNodeLeft(GridComputeTaskSession ses) throws GridException { ((GridComputeJobMasterLeaveAware)r).onMasterNodeLeft(ses); } };
@Override public void onMasterNodeLeft(GridComputeTaskSession ses) throws GridException { ((GridComputeJobMasterLeaveAware)job).onMasterNodeLeft(ses); } };