/** <inheritDoc /> */ override public IDictionary <IComputeJob <IPortableObject>, IClusterNode> Map(IList <IClusterNode> subgrid, IPortableObject arg) { Assert.AreEqual(3, subgrid.Count); Assert.NotNull(_grid); IPortableObject taskArg = arg; CheckTaskArgument(taskArg); CheckTaskArgument(_taskArgField); IDictionary <IComputeJob <IPortableObject>, IClusterNode> jobs = new Dictionary <IComputeJob <IPortableObject>, IClusterNode>(); foreach (IClusterNode node in subgrid) { if (!Grid3Name.Equals(node.Attribute <string>("org.apache.ignite.ignite.name"))) // Grid3 does not have cache. { PortableJob job = new PortableJob(); job.Arg = ToPortable(_grid, new PortableJobArgument(200)); jobs.Add(job, node); } } Assert.AreEqual(2, jobs.Count); return(jobs); }
/** <inheritDoc /> */ override public IDictionary <IComputeJob <BinarizableWrapper>, IClusterNode> Map(IList <IClusterNode> subgrid, BinarizableWrapper arg) { Assert.AreEqual(3, subgrid.Count); Assert.NotNull(_grid); var taskArg = arg; CheckTaskArgument(taskArg); CheckTaskArgument(_taskArgField); var jobs = new Dictionary <IComputeJob <BinarizableWrapper>, IClusterNode>(); foreach (IClusterNode node in subgrid) { if (!Grid3Name.Equals(node.GetAttribute <string>("org.apache.ignite.ignite.name"))) // Grid3 does not have cache. { var job = new BinarizableJob { Arg = new BinarizableWrapper { Item = ToBinary(_grid, new BinarizableJobArgument(200)) } }; jobs.Add(job, node); } } Assert.AreEqual(2, jobs.Count); return(jobs); }