Hi, I have started .Net node on linux and my POC application throwing exception but I have added ,PeerAssemblyLoadingMode = PeerAssemblyLoadingMode.CurrentAppDomain
Inner Exception 1: IgniteException: Compute job has failed on remote node, examine InnerException for details. Inner Exception 2: IgniteException: Failed to deserialize the job [errType=BinaryObjectException, errMsg=No matching type found for object [typeId=-1603946807, typeName=ConsoleApp2.TestModelComputeFunc`1[[Common.Models.StaticCacheModels.TestModel]]]. This usually indicates that assembly with specified type is not loaded on a node. When using Apache.Ignite.exe, make sure to load assemblies with -assembly parameter. Alternatively, set IgniteConfiguration.PeerAssemblyLoadingMode to CurrentAppDomain.] Inner Exception 3: JavaException: class org.apache.ignite.IgniteException: Failed to deserialize the job [errType=BinaryObjectException, errMsg=No matching type found for object [typeId=-1603946807, typeName=ConsoleApp2.TestModelComputeFunc`1[[Common.Models.StaticCacheModels.TestModel]]]. This usually indicates that assembly with specified type is not loaded on a node. When using Apache.Ignite.exe, make sure to load assemblies with -assembly parameter. Alternatively, set IgniteConfiguration.PeerAssemblyLoadingMode to CurrentAppDomain.] at org.apache.ignite.internal.processors.platform.callback.PlatformCallbackUtils.inLongOutLong(Native Method) at org.apache.ignite.internal.processors.platform.callback.PlatformCallbackGateway.computeJobCreate(PlatformCallbackGateway.java:295) at org.apache.ignite.internal.processors.platform.compute.PlatformAbstractJob.createJob(PlatformAbstractJob.java:114) at org.apache.ignite.internal.processors.platform.compute.PlatformClosureJob.execute0(PlatformClosureJob.java:66) at org.apache.ignite.internal.processors.platform.compute.PlatformAbstractJob.execute(PlatformAbstractJob.java:80) at org.apache.ignite.internal.processors.job.GridJobWorker$2.call(GridJobWorker.java:620) at org.apache.ignite.internal.util.IgniteUtils.wrapThreadLoader(IgniteUtils.java:7366) at org.apache.ignite.internal.processors.job.GridJobWorker.execute0(GridJobWorker.java:614) at org.apache.ignite.internal.processors.job.GridJobWorker.body(GridJobWorker.java:539) at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:125) at org.apache.ignite.internal.processors.job.GridJobProcessor.processJobExecuteRequest(GridJobProcessor.java:1417) at org.apache.ignite.internal.processors.job.GridJobProcessor$JobExecutionListener.onMessage(GridJobProcessor.java:2199) at org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1909) at org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1530) at org.apache.ignite.internal.managers.communication.GridIoManager.access$5300(GridIoManager.java:243) at org.apache.ignite.internal.managers.communication.GridIoManager$9.execute(GridIoManager.java:1423) at org.apache.ignite.internal.managers.communication.TraceRunnable.run(TraceRunnable.java:55) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Regards, Charlin On Fri, 26 Aug 2022 at 19:30, Charlin S <charli...@hotelhub.com> wrote: > Hi, > Thank you for updating me. I will try and keep you updated. > > Regards, > Charlin > > > On Fri, 26 Aug 2022 at 18:47, Pavel Tupitsyn <ptupit...@apache.org> wrote: > >> Instead of ignite.sh, please use the following file from the binary >> package to start Ignite nodes on those Linux machines: >> platforms/dotnet/bin/netcoreapp3.1/Apache.Ignite.Executable >> >> >> >> On Fri, Aug 26, 2022 at 4:03 PM Charlin S <charli...@hotelhub.com> wrote: >> >>> Hi, >>> Server Node 1 IP and Server Node 2 IP are Linux machines, where we have >>> hosted our Ignite as server node through Binary release packages. >>> My requirement is to do computing from a client application (c#). >>> >>> Regards, >>> Charlin >>> >>> >>> >>> >>> On Thu, 25 Aug 2022 at 18:55, Pavel Tupitsyn <ptupit...@apache.org> >>> wrote: >>> >>>> You are starting the client .NET node correctly. It connects to a >>>> cluster. >>>> However, SERVER nodes in your cluster are not .NET nodes, they are >>>> probably Java-only nodes, and can not execute .NET computations. >>>> >>>> You should fix the server nodes which are at "Server Node 1 IP", >>>> "Server Node 2 IP". Start them with Apache.Ignite.exe (Windows), >>>> Apache.Ignite.Executable (Linux), >>>> or from your own code with Ignition.Start without client mode. >>>> >>>> >>>> On Thu, Aug 25, 2022 at 4:00 PM Charlin S <charli...@hotelhub.com> >>>> wrote: >>>> >>>>> Hi, >>>>> Could you please share how to start .net nodes (client nodes) through >>>>> application. currently my application having following code to start .net >>>>> node >>>>> var cfg = new IgniteConfiguration >>>>> { >>>>> // setting node type as client or server >>>>> ClientMode=true, >>>>> DiscoverySpi = new TcpDiscoverySpi >>>>> { >>>>> LocalPort = 55800, >>>>> //LocalPortRange = 10, >>>>> IpFinder = new TcpDiscoveryStaticIpFinder >>>>> { >>>>> Endpoints = new[] { "Server Node 1 IP:55800", >>>>> "Server Node 2 IP:55800" } >>>>> } >>>>> } >>>>> }; >>>>> InstanceObject = Ignition.Start(cfg); >>>>> >>>>> var compute = InstanceObject.GetCluster().ForRemotes().GetCompute(); >>>>> compute.Broadcast(calls); //failing with Topology projection is >>>>> empty, if I comment or uncomment the ClientMode=true, >>>>> >>>>> var compute1 = InstanceObject.GetCompute(); >>>>> var res = compute1.Call(calls); // success if I uncomment the >>>>> ClientMode=true, >>>>> Please help me with this. >>>>> >>>>> Regards, >>>>> Charlin >>>>> >>>>> >>>>> On Thu, 25 Aug 2022 at 14:42, Pavel Tupitsyn <ptupit...@apache.org> >>>>> wrote: >>>>> >>>>>> > can we run computing tasks from the Ignite client node? >>>>>> yes >>>>>> >>>>>> > I have tried Ignite.GetCluster().ForRemotes().GetCompute() but >>>>>> getting ClusterGroupEmptyException: Topology projection is empty. >>>>>> There are no remote .NET nodes in your cluster. >>>>>> >>>>>> On Thu, Aug 25, 2022 at 9:51 AM Charlin S <charli...@hotelhub.com> >>>>>> wrote: >>>>>> >>>>>>> Hi, >>>>>>> can we run computing tasks from the Ignite client node? I have tried >>>>>>> Ignite.GetCluster().ForRemotes().GetCompute() but >>>>>>> getting ClusterGroupEmptyException: Topology projection is empty. >>>>>>> >>>>>>> Regards, >>>>>>> Charlin >>>>>>> >>>>>>> >>>>>>> On Wed, 24 Aug 2022 at 19:27, Pavel Tupitsyn <ptupit...@apache.org> >>>>>>> wrote: >>>>>>> >>>>>>>> Yes, starting clients and servers from your own C# code is a valid >>>>>>>> approach. >>>>>>>> >>>>>>>> On Wed, Aug 24, 2022 at 4:02 PM Charlin S <charli...@hotelhub.com> >>>>>>>> wrote: >>>>>>>> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> Earlier my application joined as client by using xml bean and now >>>>>>>>> Topology empty error gone if I start ignite on my application as >>>>>>>>> follows >>>>>>>>> var cfg = new IgniteConfiguration >>>>>>>>> { >>>>>>>>> DiscoverySpi = new TcpDiscoverySpi >>>>>>>>> { >>>>>>>>> LocalPort = 55800, >>>>>>>>> //LocalPortRange = 10, >>>>>>>>> IpFinder = new TcpDiscoveryStaticIpFinder >>>>>>>>> { >>>>>>>>> Endpoints = new[] { "Remote:55800", >>>>>>>>> "Remote:55800" } >>>>>>>>> } >>>>>>>>> } >>>>>>>>> }; >>>>>>>>> InstanceObject = Ignition.Start(cfg); >>>>>>>>> >>>>>>>>> Can we perform the same action on the client side? >>>>>>>>> >>>>>>>>> Regards, >>>>>>>>> Charlin >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On Wed, 24 Aug 2022 at 18:14, Pavel Tupitsyn <ptupit...@apache.org> >>>>>>>>> wrote: >>>>>>>>> >>>>>>>>>> > Topology projection is empty. >>>>>>>>>> >>>>>>>>>> Looks like there are no .NET nodes in the cluster. >>>>>>>>>> >>>>>>>>>> How do you start server nodes? ignite.sh/ignite.bat won't work, >>>>>>>>>> since those start Java-only nodes. >>>>>>>>>> To start .NET nodes, use Apache.Ignite.exe (Windows) >>>>>>>>>> or Apache.Ignite.Executable (Linux, macOS). >>>>>>>>>> >>>>>>>>>> On Wed, Aug 24, 2022 at 3:17 PM Charlin S <charli...@hotelhub.com> >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>>> Hi, >>>>>>>>>>> New error with new changes >>>>>>>>>>> System.AggregateException >>>>>>>>>>> HResult=0x80131500 >>>>>>>>>>> Message=One or more errors occurred. (Topology projection is >>>>>>>>>>> empty.) >>>>>>>>>>> Source=System.Private.CoreLib >>>>>>>>>>> StackTrace: >>>>>>>>>>> at System.Threading.Tasks.Task`1.GetResultCore(Boolean >>>>>>>>>>> waitCompletionNotification) >>>>>>>>>>> at System.Threading.Tasks.Task`1.get_Result() >>>>>>>>>>> at Apache.Ignite.Core.Impl.Common.Future`1.Get() >>>>>>>>>>> at >>>>>>>>>>> Apache.Ignite.Core.Impl.Compute.Compute.Call[TJobRes](IComputeFunc`1 >>>>>>>>>>> clo) >>>>>>>>>>> at >>>>>>>>>>> ConsoleApp2.CacheUtils.ComputeTest_OnIgnite_OnIgnite(String >>>>>>>>>>> searchCriteria) >>>>>>>>>>> in D:\NGSourceCode\POC\ConsoleApp2\ConsoleApp2\CacheUtils.cs:line 75 >>>>>>>>>>> at ConsoleApp2.Program.Main(String[] args) in >>>>>>>>>>> D:\NGSourceCode\POC\ConsoleApp2\ConsoleApp2\Program.cs:line 19 >>>>>>>>>>> >>>>>>>>>>> Inner Exception 1: >>>>>>>>>>> ClusterGroupEmptyException: Topology projection is empty. >>>>>>>>>>> >>>>>>>>>>> Inner Exception 2: >>>>>>>>>>> JavaException: class >>>>>>>>>>> org.apache.ignite.internal.cluster.ClusterGroupEmptyCheckedException: >>>>>>>>>>> Topology projection is empty. >>>>>>>>>>> at >>>>>>>>>>> org.apache.ignite.internal.processors.task.GridTaskWorker.getTaskTopology(GridTaskWorker.java:689) >>>>>>>>>>> at >>>>>>>>>>> org.apache.ignite.internal.processors.task.GridTaskWorker.body(GridTaskWorker.java:502) >>>>>>>>>>> at >>>>>>>>>>> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120) >>>>>>>>>>> at >>>>>>>>>>> org.apache.ignite.internal.processors.task.GridTaskProcessor.startTask(GridTaskProcessor.java:843) >>>>>>>>>>> at >>>>>>>>>>> org.apache.ignite.internal.processors.task.GridTaskProcessor.execute(GridTaskProcessor.java:508) >>>>>>>>>>> at >>>>>>>>>>> org.apache.ignite.internal.processors.task.GridTaskProcessor.execute(GridTaskProcessor.java:476) >>>>>>>>>>> at >>>>>>>>>>> org.apache.ignite.internal.IgniteComputeImpl.executeAsync0(IgniteComputeImpl.java:564) >>>>>>>>>>> at >>>>>>>>>>> org.apache.ignite.internal.processors.platform.compute.PlatformCompute.executeNative0(PlatformCompute.java:329) >>>>>>>>>>> at >>>>>>>>>>> org.apache.ignite.internal.processors.platform.compute.PlatformCompute.processClosures(PlatformCompute.java:294) >>>>>>>>>>> at >>>>>>>>>>> org.apache.ignite.internal.processors.platform.compute.PlatformCompute.processInStreamOutObject(PlatformCompute.java:137) >>>>>>>>>>> at >>>>>>>>>>> org.apache.ignite.internal.processors.platform.PlatformTargetProxyImpl.inStreamOutObject(PlatformTargetProxyImpl.java:79) >>>>>>>>>>> >>>>>>>>>>> Regards, >>>>>>>>>>> Charlin >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Wed, 24 Aug 2022 at 17:16, Pavel Tupitsyn < >>>>>>>>>>> ptupit...@apache.org> wrote: >>>>>>>>>>> >>>>>>>>>>>> > Sorry to bother you,does scan in distribute compute faster >>>>>>>>>>>> than use a scan in client? >>>>>>>>>>>> >>>>>>>>>>>> Depends on the use case. Always measure your own scenario. >>>>>>>>>>>> >>>>>>>>>>>> On Wed, Aug 24, 2022 at 2:34 PM wkhapy...@gmail.com < >>>>>>>>>>>> wkhapy...@gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Sorry to bother you,does scan in distribute compute faster >>>>>>>>>>>>> than use a scan in client? >>>>>>>>>>>>> >>>>>>>>>>>>> ---Original--- >>>>>>>>>>>>> *From:* "Pavel Tupitsyn"<ptupit...@apache.org> >>>>>>>>>>>>> *Date:* Wed, Aug 24, 2022 19:14 PM >>>>>>>>>>>>> *To:* "user"<user@ignite.apache.org>; >>>>>>>>>>>>> *Subject:* Re: distributed-computing error >>>>>>>>>>>>> System.Runtime.Serialization.ISerializable >>>>>>>>>>>>> >>>>>>>>>>>>> This line is the problem: >>>>>>>>>>>>> public ICache<string, T> IgniteCache { get; set; } >>>>>>>>>>>>> >>>>>>>>>>>>> You can't serialize an Ignite cache. Instead, use >>>>>>>>>>>>> [InstanceResource] - uncomment the line you already have, then >>>>>>>>>>>>> get the >>>>>>>>>>>>> cache by name: >>>>>>>>>>>>> >>>>>>>>>>>>> [InstanceResource] private readonly IIgnite _ignite; >>>>>>>>>>>>> public string CacheName { get; set; } >>>>>>>>>>>>> >>>>>>>>>>>>> ... >>>>>>>>>>>>> >>>>>>>>>>>>> var cache = _ignite.GetCache<string, T>(CacheName); >>>>>>>>>>>>> cache.Query(...) >>>>>>>>>>>>> >>>>>>>>>>>>> On Wed, Aug 24, 2022 at 1:31 PM Charlin S < >>>>>>>>>>>>> charli...@hotelhub.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Hi, >>>>>>>>>>>>>> The exception details are as follows. >>>>>>>>>>>>>> System.AggregateException >>>>>>>>>>>>>> HResult=0x80131500 >>>>>>>>>>>>>> Message=One or more errors occurred. (Serializing delegates >>>>>>>>>>>>>> is not supported on this platform.) >>>>>>>>>>>>>> Source=System.Private.CoreLib >>>>>>>>>>>>>> StackTrace: >>>>>>>>>>>>>> at System.Threading.Tasks.Task`1.GetResultCore(Boolean >>>>>>>>>>>>>> waitCompletionNotification) >>>>>>>>>>>>>> at System.Threading.Tasks.Task`1.get_Result() >>>>>>>>>>>>>> at Apache.Ignite.Core.Impl.Common.Future`1.Get() >>>>>>>>>>>>>> at >>>>>>>>>>>>>> Apache.Ignite.Core.Impl.Compute.Compute.Apply[TArg,TJobRes](IComputeFunc`2 >>>>>>>>>>>>>> clo, TArg arg) >>>>>>>>>>>>>> at ConsoleApp2.CacheUtils.ComputeTest_OnIgnite(String >>>>>>>>>>>>>> searchCriteria) in >>>>>>>>>>>>>> D:\NGSourceCode\POC\ConsoleApp2\ConsoleApp2\CacheUtils.cs:line 76 >>>>>>>>>>>>>> at ConsoleApp2.Program.Main(String[] args) in >>>>>>>>>>>>>> D:\NGSourceCode\POC\ConsoleApp2\ConsoleApp2\Program.cs:line 19 >>>>>>>>>>>>>> >>>>>>>>>>>>>> This exception was originally thrown at this call stack: >>>>>>>>>>>>>> >>>>>>>>>>>>>> System.MulticastDelegate.GetObjectData(System.Runtime.Serialization.SerializationInfo, >>>>>>>>>>>>>> System.Runtime.Serialization.StreamingContext) >>>>>>>>>>>>>> >>>>>>>>>>>>>> Apache.Ignite.Core.Impl.Binary.SerializableSerializer.WriteBinary<T>(T, >>>>>>>>>>>>>> Apache.Ignite.Core.Impl.Binary.BinaryWriter) >>>>>>>>>>>>>> Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write<T>(T) >>>>>>>>>>>>>> >>>>>>>>>>>>>> Apache.Ignite.Core.Impl.Binary.BinaryWriter.WriteObject<T>(string, >>>>>>>>>>>>>> T) >>>>>>>>>>>>>> >>>>>>>>>>>>>> Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.WriteBinary<T>(T, >>>>>>>>>>>>>> Apache.Ignite.Core.Impl.Binary.BinaryWriter) >>>>>>>>>>>>>> Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write<T>(T) >>>>>>>>>>>>>> >>>>>>>>>>>>>> Apache.Ignite.Core.Impl.Binary.BinaryWriter.WriteObject<T>(string, >>>>>>>>>>>>>> T) >>>>>>>>>>>>>> >>>>>>>>>>>>>> Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.WriteBinary<T>(T, >>>>>>>>>>>>>> Apache.Ignite.Core.Impl.Binary.BinaryWriter) >>>>>>>>>>>>>> Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write<T>(T) >>>>>>>>>>>>>> >>>>>>>>>>>>>> Apache.Ignite.Core.Impl.Binary.BinaryWriter.WriteObject<T>(string, >>>>>>>>>>>>>> T) >>>>>>>>>>>>>> ... >>>>>>>>>>>>>> [Call Stack Truncated] >>>>>>>>>>>>>> >>>>>>>>>>>>>> Inner Exception 1: >>>>>>>>>>>>>> SerializationException: Serializing delegates is not >>>>>>>>>>>>>> supported on this platform. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Note: I am having two 2 server nodes and running the POC >>>>>>>>>>>>>> application on a client node. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Regards, >>>>>>>>>>>>>> Charlin >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Wed, 24 Aug 2022 at 15:02, Pavel Tupitsyn < >>>>>>>>>>>>>> ptupit...@apache.org> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Please share the exception with full stack trace (you've >>>>>>>>>>>>>>> only shared some warnings, which may or may not be a problem). >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Wed, Aug 24, 2022 at 10:26 AM Charlin S < >>>>>>>>>>>>>>> charli...@hotelhub.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I have a requirement to fetch the data using >>>>>>>>>>>>>>>> distributed-computing function and error at >>>>>>>>>>>>>>>> var res = >>>>>>>>>>>>>>>> CacheInstance.Instance.InstanceObject.GetCompute().Call(calls); >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> // InstanceObject singleton object for Ignite >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> [11:16:34,865][WARNING][main][Marshaller] Type >>>>>>>>>>>>>>>> 'System.Collections.Generic.Dictionary`2[System.Int64,Apache.Ignite.Core.Impl.Binary.BinaryFullTypeDescriptor]' >>>>>>>>>>>>>>>> implements 'System.Runtime.Serialization.ISerializable'. It >>>>>>>>>>>>>>>> will be written >>>>>>>>>>>>>>>> in Ignite binary format, however, the following limitations >>>>>>>>>>>>>>>> apply: DateTime >>>>>>>>>>>>>>>> fields would not work in SQL; sbyte, ushort, uint, ulong >>>>>>>>>>>>>>>> fields would not >>>>>>>>>>>>>>>> work in DML. >>>>>>>>>>>>>>>> [11:16:34,889][WARNING][main][Marshaller] Type >>>>>>>>>>>>>>>> 'System.Collections.Generic.Dictionary`2[System.String,System.Byte]' >>>>>>>>>>>>>>>> implements 'System.Runtime.Serialization.ISerializable'. It >>>>>>>>>>>>>>>> will be written >>>>>>>>>>>>>>>> in Ignite binary format, however, the following limitations >>>>>>>>>>>>>>>> apply: DateTime >>>>>>>>>>>>>>>> fields would not work in SQL; sbyte, ushort, uint, ulong >>>>>>>>>>>>>>>> fields would not >>>>>>>>>>>>>>>> work in DML. >>>>>>>>>>>>>>>> [11:16:34,895][WARNING][main][Marshaller] Type >>>>>>>>>>>>>>>> 'System.Func`2[Apache.Ignite.Core.Impl.Binary.BinaryReader,Apache.Ignite.Core.Impl.Compute.ComputeJobHolder]' >>>>>>>>>>>>>>>> implements 'System.Runtime.Serialization.ISerializable'. It >>>>>>>>>>>>>>>> will be written >>>>>>>>>>>>>>>> in Ignite binary format, however, the following limitations >>>>>>>>>>>>>>>> apply: DateTime >>>>>>>>>>>>>>>> fields would not work in SQL; sbyte, ushort, uint, ulong >>>>>>>>>>>>>>>> fields would not >>>>>>>>>>>>>>>> work in DML. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Kindly help me on this and I have shared the implementation >>>>>>>>>>>>>>>> below. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> public class ComputeTestModel : IBinarizable >>>>>>>>>>>>>>>> { >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> [QuerySqlField] >>>>>>>>>>>>>>>> public string TestField1 { get; set; } >>>>>>>>>>>>>>>> [QuerySqlField] >>>>>>>>>>>>>>>> public string TestField2 { get; set; } >>>>>>>>>>>>>>>> [QuerySqlField] >>>>>>>>>>>>>>>> public string TestField3 { get; set; } >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> public void ReadBinary(IBinaryReader reader){}//not >>>>>>>>>>>>>>>> added implementation here >>>>>>>>>>>>>>>> public void WriteBinary(IBinaryWriter >>>>>>>>>>>>>>>> writer){}//not added implementation here >>>>>>>>>>>>>>>> } >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> class TestModelComputeFunc<T> : >>>>>>>>>>>>>>>> IComputeFunc<List<ComputeTestModel>> >>>>>>>>>>>>>>>> { >>>>>>>>>>>>>>>> // [InstanceResource] private readonly IIgnite >>>>>>>>>>>>>>>> _ignite; >>>>>>>>>>>>>>>> public ICache<string, T> IgniteCache { get; set; } >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> public string _searchCriteria { get; set; } >>>>>>>>>>>>>>>> public TestModelComputeFunc(ICache<string, T> >>>>>>>>>>>>>>>> igniteCache, string searchCriteria) >>>>>>>>>>>>>>>> { >>>>>>>>>>>>>>>> IgniteCache = igniteCache; >>>>>>>>>>>>>>>> _searchCriteria = searchCriteria; >>>>>>>>>>>>>>>> } >>>>>>>>>>>>>>>> public List<ComputeTestModel> Invoke() >>>>>>>>>>>>>>>> { >>>>>>>>>>>>>>>> List<ComputeTestModel> objs = new >>>>>>>>>>>>>>>> List<ComputeTestModel>(); >>>>>>>>>>>>>>>> string query = "select * from ComputeTestModel >>>>>>>>>>>>>>>> where TestField1 = ?"; >>>>>>>>>>>>>>>> SqlFieldsQuery fieldsQuery = new >>>>>>>>>>>>>>>> SqlFieldsQuery(query, _searchCriteria); >>>>>>>>>>>>>>>> IFieldsQueryCursor queryCursor = >>>>>>>>>>>>>>>> IgniteCache.Query(fieldsQuery); >>>>>>>>>>>>>>>> if (queryCursor != null) >>>>>>>>>>>>>>>> { >>>>>>>>>>>>>>>> foreach (var cacheEntry in queryCursor) >>>>>>>>>>>>>>>> { >>>>>>>>>>>>>>>> objs.Add(new ComputeTestModel >>>>>>>>>>>>>>>> { >>>>>>>>>>>>>>>> TestField1 = cacheEntry[0] as >>>>>>>>>>>>>>>> string, >>>>>>>>>>>>>>>> TestField2 = cacheEntry[1] as >>>>>>>>>>>>>>>> string, >>>>>>>>>>>>>>>> TestField3 = cacheEntry[2] as string >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> }); >>>>>>>>>>>>>>>> } >>>>>>>>>>>>>>>> return objs; >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> } >>>>>>>>>>>>>>>> return null; >>>>>>>>>>>>>>>> } >>>>>>>>>>>>>>>> } >>>>>>>>>>>>>>>> } >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> public static class CacheUtilsTest >>>>>>>>>>>>>>>> { >>>>>>>>>>>>>>>> public static List<ComputeTestModel> >>>>>>>>>>>>>>>> ComputeTest_OnIgnite(string searchCriteria) >>>>>>>>>>>>>>>> { >>>>>>>>>>>>>>>> //CacheInstance.Instance.ComputeTestICache defined in >>>>>>>>>>>>>>>> another class public ICache<string, ComputeTestModel> >>>>>>>>>>>>>>>> ComputeTestModelICache { get; set; } >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> ComputeTestComputeFunc<ComputeTestModel> calls >>>>>>>>>>>>>>>> = new >>>>>>>>>>>>>>>> ComputeTestComputeFunc<ComputeTestModel>(CacheInstance.Instance.ComputeTestICache, >>>>>>>>>>>>>>>> searchCriteria); >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> // Execute the collection of calls on the >>>>>>>>>>>>>>>> cluster. >>>>>>>>>>>>>>>> var res = >>>>>>>>>>>>>>>> CacheInstance.Instance.InstanceObject.GetCompute().Call(calls); >>>>>>>>>>>>>>>> //exception thrown here >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> /* >>>>>>>>>>>>>>>> //another aproach >>>>>>>>>>>>>>>> ComputeTestComputeFunc<ComputeTestModel> cacheObject = new >>>>>>>>>>>>>>>> ComputeTestComputeFunc<ComputeTestModel>(CacheInstance.Instance.ComputeTestICache, >>>>>>>>>>>>>>>> searchCriteria); >>>>>>>>>>>>>>>> // var calls = >>>>>>>>>>>>>>>> CacheInstance.Instance.ComputeTestICache.Select(s => >>>>>>>>>>>>>>>> cacheObject).ToList(); >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> // Execute the collection of calls on the >>>>>>>>>>>>>>>> cluster. >>>>>>>>>>>>>>>> var res = >>>>>>>>>>>>>>>> CacheInstance.Instance.InstanceObject.GetCompute().Call(calls); >>>>>>>>>>>>>>>> //exception thrown here >>>>>>>>>>>>>>>> */ >>>>>>>>>>>>>>>> return null; >>>>>>>>>>>>>>>> } >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> } >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> class Program >>>>>>>>>>>>>>>> { >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> static void Main(string[] args) >>>>>>>>>>>>>>>> { >>>>>>>>>>>>>>>> // Console.WriteLine("Hello World!"); >>>>>>>>>>>>>>>> var saticCache = >>>>>>>>>>>>>>>> CacheInstance.Instance.InstanceObject; >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> var res = >>>>>>>>>>>>>>>> CacheUtilsTest.ComputeTest_OnIgnite("A"); >>>>>>>>>>>>>>>> int ans= res.Count(); >>>>>>>>>>>>>>>> Console.ReadKey(); >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> } >>>>>>>>>>>>>>>> } >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Regards, >>>>>>>>>>>>>>>> Charlin >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>