Re: distributed-computing error System.Runtime.Serialization.ISerializable

2022-08-29 Thread Jeremy McMillan
; 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
>&

Re: distributed-computing error System.Runtime.Serialization.ISerializable

2022-08-29 Thread Charlin S
;>>>>
>>>>>>>>> Regards,
>>>>>>>>> Charlin
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wed, 24 Aug 2022 at 18:14, Pavel Tupitsyn 
>>>>>>>>> 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 
>>>>>>>>>> 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.comp

Re: distributed-computing error System.Runtime.Serialization.ISerializable

2022-08-26 Thread Charlin S
ar 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 
>>>>>>>> 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 
>>>>>>>>> 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)
>>>>>>>>>

Re: distributed-computing error System.Runtime.Serialization.ISerializable

2022-08-24 Thread Charlin S
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  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 
> wrote:
>
>> Sorry to bother you,does scan in distribute compute faster than use a
>> scan in client?
>>
>> ---Original---
>> *From:* "Pavel Tupitsyn"
>> *Date:* Wed, Aug 24, 2022 19:14 PM
>> *To:* "user";
>> *Subject:* Re: distributed-computing error
>> System.Runtime.Serialization.ISerializable
>>
>> This line is the problem:
>> public ICache 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(CacheName);
>> cache.Query(...)
>>
>> On Wed, Aug 24, 2022 at 1:31 PM Charlin S  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,
>>> Apache.Ignite.Core.Impl.Binary.BinaryWriter)
>>> Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write(T)
>>> Apache.Ignite.Core.Impl.Binary.BinaryWriter.WriteObject(string, T)
>>>
>>> Apache.Ignite.Core.Impl.Binary.Bin

Re: distributed-computing error System.Runtime.Serialization.ISerializable

2022-08-24 Thread Pavel Tupitsyn
> 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 
wrote:

> Sorry to bother you,does scan in distribute compute faster than use a scan
> in client?
>
> ---Original---
> *From:* "Pavel Tupitsyn"
> *Date:* Wed, Aug 24, 2022 19:14 PM
> *To:* "user";
> *Subject:* Re: distributed-computing error
> System.Runtime.Serialization.ISerializable
>
> This line is the problem:
> public ICache 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(CacheName);
> cache.Query(...)
>
> On Wed, Aug 24, 2022 at 1:31 PM Charlin S  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,
>> Apache.Ignite.Core.Impl.Binary.BinaryWriter)
>> Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write(T)
>> Apache.Ignite.Core.Impl.Binary.BinaryWriter.WriteObject(string, T)
>>
>> Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.WriteBinary(T,
>> Apache.Ignite.Core.Impl.Binary.BinaryWriter)
>> Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write(T)
>> Apache.Ignite.Core.Impl.Binary.BinaryWriter.WriteObject(string, T)
>>
>> Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.WriteBinary(T,
>> Apache.Ignite.Core.Impl.Binary.BinaryWriter)
>> Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write(T)
>> Apache.Ignite.Core.Impl.Binary.BinaryWriter.WriteObject(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 
>> 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 
>>> 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 writt

Re: distributed-computing error System.Runtime.Serialization.ISerializable

2022-08-24 Thread wkhapy123


Re: distributed-computing error System.Runtime.Serialization.ISerializable

2022-08-24 Thread Pavel Tupitsyn
This line is the problem:
public ICache 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(CacheName);
cache.Query(...)

On Wed, Aug 24, 2022 at 1:31 PM Charlin S  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,
> Apache.Ignite.Core.Impl.Binary.BinaryWriter)
> Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write(T)
> Apache.Ignite.Core.Impl.Binary.BinaryWriter.WriteObject(string, T)
>
> Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.WriteBinary(T,
> Apache.Ignite.Core.Impl.Binary.BinaryWriter)
> Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write(T)
> Apache.Ignite.Core.Impl.Binary.BinaryWriter.WriteObject(string, T)
>
> Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.WriteBinary(T,
> Apache.Ignite.Core.Impl.Binary.BinaryWriter)
> Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write(T)
> Apache.Ignite.Core.Impl.Binary.BinaryWriter.WriteObject(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  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 
>> 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 : IComputeFunc>
>>> {
>>> // [InstanceResource] private readonly 

Re: distributed-computing error System.Runtime.Serialization.ISerializable

2022-08-24 Thread Charlin S
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,
Apache.Ignite.Core.Impl.Binary.BinaryWriter)
Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write(T)
Apache.Ignite.Core.Impl.Binary.BinaryWriter.WriteObject(string, T)

Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.WriteBinary(T,
Apache.Ignite.Core.Impl.Binary.BinaryWriter)
Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write(T)
Apache.Ignite.Core.Impl.Binary.BinaryWriter.WriteObject(string, T)

Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.WriteBinary(T,
Apache.Ignite.Core.Impl.Binary.BinaryWriter)
Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write(T)
Apache.Ignite.Core.Impl.Binary.BinaryWriter.WriteObject(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  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  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 : IComputeFunc>
>> {
>> // [InstanceResource] private readonly IIgnite _ignite;
>> public ICache IgniteCache { get; set; }
>>
>> public string _searchCriteria { get; set; }
>> public TestModelComputeFunc(ICache igniteCache, string
>> searchCriteria)
>> {
>> IgniteCache = igniteCache;
>> _searchCriteria = searchCriteria;
>> }
>> public List Invoke()
>> {
>> List objs = new List();
>> string query = "select * from ComputeTestModel where
>>  TestField1 = ?";
>> SqlFieldsQuery fieldsQuery =  new 

Re: distributed-computing error System.Runtime.Serialization.ISerializable

2022-08-24 Thread Pavel Tupitsyn
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  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 : IComputeFunc>
> {
> // [InstanceResource] private readonly IIgnite _ignite;
> public ICache IgniteCache { get; set; }
>
> public string _searchCriteria { get; set; }
> public TestModelComputeFunc(ICache igniteCache, string
> searchCriteria)
> {
> IgniteCache = igniteCache;
> _searchCriteria = searchCriteria;
> }
> public List Invoke()
> {
> List objs = new List();
> 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 ComputeTest_OnIgnite(string
> searchCriteria)
> {
> //CacheInstance.Instance.ComputeTestICache defined in another class public
> ICache ComputeTestModelICache { get; set; }
>
> ComputeTestComputeFunc calls = new
> ComputeTestComputeFunc(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 cacheObject = new
> ComputeTestComputeFunc(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
>
>
>


distributed-computing error System.Runtime.Serialization.ISerializable

2022-08-24 Thread Charlin S
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 : IComputeFunc>
{
// [InstanceResource] private readonly IIgnite _ignite;
public ICache IgniteCache { get; set; }

public string _searchCriteria { get; set; }
public TestModelComputeFunc(ICache igniteCache, string
searchCriteria)
{
IgniteCache = igniteCache;
_searchCriteria = searchCriteria;
}
public List Invoke()
{
List objs = new List();
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 ComputeTest_OnIgnite(string
searchCriteria)
{
//CacheInstance.Instance.ComputeTestICache defined in another class public
ICache ComputeTestModelICache { get; set; }

ComputeTestComputeFunc calls = new
ComputeTestComputeFunc(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 cacheObject = new
ComputeTestComputeFunc(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