/// <summary> /// Executes local job. /// </summary> /// <param name="cancel">Cancel flag.</param> public void ExecuteLocal(bool cancel) { object res; bool success; Execute0(cancel, out res, out success); _jobRes = new ComputeJobResultImpl( success ? res : null, success ? null : new IgniteException("Compute job has failed on local node, " + "examine InnerException for details.", (Exception)res), _job, _ignite.GetCluster().GetLocalNode().Id, cancel ); }
/// <summary> /// Gets the assembly from remote nodes. /// </summary> /// <param name="assemblyName">Name of the assembly.</param> /// <param name="ignite">Ignite.</param> /// <param name="originNodeId">The origin node identifier.</param> /// <returns> /// Successful result or null. /// </returns> /// <exception cref="IgniteException"></exception> private static AssemblyRequestResult RequestAssembly(string assemblyName, IIgniteInternal ignite, Guid originNodeId) { Debug.Assert(assemblyName != null); Debug.Assert(ignite != null); if (ignite.Configuration.PeerAssemblyLoadingMode == PeerAssemblyLoadingMode.Disabled) { return(null); } Debug.WriteLine("Requesting assembly from other nodes: " + assemblyName); // New nodes are not tracked during the loop, since some of the existing nodes caused this call. var func = new GetAssemblyFunc(); var req = new AssemblyRequest(assemblyName); foreach (var node in GetDotNetNodes(ignite, originNodeId)) { var compute = ignite.GetCluster().ForNodeIds(node).GetCompute(); var result = ComputeApplySafe(compute, func, req); if (result != null) { if (result.AssemblyBytes != null) { return(result); } if (result.Message != null) { throw new IgniteException(result.Message); } } } return(null); }