Пример #1
0
        public void ExecuteLocal(bool cancel)
        {
            ComputeRunner.InjectResources(_ignite, _job);

            var nodeId = _ignite.GetIgnite().GetCluster().GetLocalNode().Id;

            try
            {
                var res = Execute0(cancel);

                _jobRes = new ComputeJobResultImpl(res, null, _job, nodeId, cancel);
            }
            catch (Exception e)
            {
                var ex = new IgniteException(
                    "Compute job has failed on local node, examine InnerException for details.", e);

                _jobRes = new ComputeJobResultImpl(null, ex, _job, nodeId, cancel);
            }
        }
Пример #2
0
 /// <summary>
 /// Execute job serializing result to the stream.
 /// </summary>
 /// <param name="cancel">Whether the job must be cancelled.</param>
 /// <param name="stream">Stream.</param>
 public void ExecuteRemote(PlatformMemoryStream stream, bool cancel)
 {
     ComputeRunner.ExecuteJobAndWriteResults(_ignite, stream, _job, _ => Execute0(cancel));
 }