Re: Ignite node log file setup

2020-06-05 Thread akorensh
Hi,
   Update the file appender, and put cache-node-01 into the filename 
property as below.

   
   


Use env variables in your appenders, or re-config at run time as need
be.
 see: https://apacheignite.readme.io/docs/logging#log4j2

   You can also pro-grammatically create the log4j/logj2 config before
starting a grid, and put the grid name into the fileName property.

Thanks, Alex

  




--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: How to get POJOs in Python?

2020-06-05 Thread Andrew Munn
I have only a few classes but they have a large number of fields.   I will
think about some code generation for Python.

On Fri, Jun 5, 2020 at 12:53 PM Ilya Kasnacheev 
wrote:

> Hello!
>
> I think that people usually have few enough classes so they can define
> them by hand.
>
> Regards.
> --
> Ilya Kasnacheev
>
>
> пт, 5 июн. 2020 г. в 19:48, Andrew Munn :
>
>> That's very helpful.  Thanks.  So it appears if I want to put in an
>> object using Java and consume it using Python I have to define the matching
>> class as done in that example.
>>
>> Do you know how this is being used in practice?  Are people generally
>> kicking off a build job that looks at Java classes and performs code
>> generation to output Python version that get included in libs?
>>
>> On Fri, Jun 5, 2020 at 7:04 AM Ilya Kasnacheev 
>> wrote:
>>
>>> Hello!
>>>
>>> Please take a look at
>>> https://github.com/apache/ignite/blob/master/modules/platforms/python/examples/binary_basics.py
>>>
>>> Regards,
>>> --
>>> Ilya Kasnacheev
>>>
>>>
>>> пт, 5 июн. 2020 г. в 01:38, Andrew Munn :
>>>
 Thanks Ilya.  I don't see anything in that post about registering the
 binary type.  I am not defining any tables using SQL.  I'm just
 instantiating POJOs, putting them in the cache and then expecting to get
 them in Python.  Can you tell me what else is required?  Is there some
 process to register the binary type?  How can I view all registered binary
 types?

 Thanks!

 On Wed, Jun 3, 2020 at 11:59 AM Ilya Kasnacheev <
 ilya.kasnach...@gmail.com> wrote:

> Hello!
>
> Have you tried the following example:
>
> https://github.com/apache/ignite/blob/master/modules/platforms/python/examples/read_binary.py
>
> (yes, it mostly works with tables, but tables and POJOs are mapped in
> the same fashion).
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> ср, 3 июн. 2020 г. в 18:54, Andrew Munn :
>
>> I'm having the same issues as these guys:
>>
>>
>> http://mail-archives.apache.org/mod_mbox/ignite-user/201901.mbox/%3csn6pr14mb2240feb74bc77de79b54ca67ca...@sn6pr14mb2240.namprd14.prod.outlook.com%3E
>>
>>
>> I would like to put POJOs in a map and get them using pyignite.
>> Python gives me ParseError('Binary type is not registered'). I was
>> hoping that Ignite would automatically store any required schema info for
>> the class so Python could use it. Especially if my simple POJO was 
>> composed
>> only of primitives.
>>
>> Are there any examples of consuming POJOs from a cache using Python?
>>
>> Thanks
>>
>>


BinaryObjectException: Conflicting enum values

2020-06-05 Thread Andrew Munn
I'm seeing the same issue as this one

.

I had values in the cache.  I cleared the cache, but did not shutdown the
cluster node.  I modified the enums in the class.  Then I repopulated the
cache with instances of the updated class.  There must be some way to purge
leftover metadata without bringing the cluster down, right?   Can it be
purged when the cache is cleared?

Thanks


Re: How to get POJOs in Python?

2020-06-05 Thread Ilya Kasnacheev
Hello!

I think that people usually have few enough classes so they can define them
by hand.

Regards.
-- 
Ilya Kasnacheev


пт, 5 июн. 2020 г. в 19:48, Andrew Munn :

> That's very helpful.  Thanks.  So it appears if I want to put in an object
> using Java and consume it using Python I have to define the matching class
> as done in that example.
>
> Do you know how this is being used in practice?  Are people generally
> kicking off a build job that looks at Java classes and performs code
> generation to output Python version that get included in libs?
>
> On Fri, Jun 5, 2020 at 7:04 AM Ilya Kasnacheev 
> wrote:
>
>> Hello!
>>
>> Please take a look at
>> https://github.com/apache/ignite/blob/master/modules/platforms/python/examples/binary_basics.py
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> пт, 5 июн. 2020 г. в 01:38, Andrew Munn :
>>
>>> Thanks Ilya.  I don't see anything in that post about registering the
>>> binary type.  I am not defining any tables using SQL.  I'm just
>>> instantiating POJOs, putting them in the cache and then expecting to get
>>> them in Python.  Can you tell me what else is required?  Is there some
>>> process to register the binary type?  How can I view all registered binary
>>> types?
>>>
>>> Thanks!
>>>
>>> On Wed, Jun 3, 2020 at 11:59 AM Ilya Kasnacheev <
>>> ilya.kasnach...@gmail.com> wrote:
>>>
 Hello!

 Have you tried the following example:

 https://github.com/apache/ignite/blob/master/modules/platforms/python/examples/read_binary.py

 (yes, it mostly works with tables, but tables and POJOs are mapped in
 the same fashion).

 Regards,
 --
 Ilya Kasnacheev


 ср, 3 июн. 2020 г. в 18:54, Andrew Munn :

> I'm having the same issues as these guys:
>
>
> http://mail-archives.apache.org/mod_mbox/ignite-user/201901.mbox/%3csn6pr14mb2240feb74bc77de79b54ca67ca...@sn6pr14mb2240.namprd14.prod.outlook.com%3E
>
>
> I would like to put POJOs in a map and get them using pyignite.
> Python gives me ParseError('Binary type is not registered'). I was
> hoping that Ignite would automatically store any required schema info for
> the class so Python could use it. Especially if my simple POJO was 
> composed
> only of primitives.
>
> Are there any examples of consuming POJOs from a cache using Python?
>
> Thanks
>
>


Re: How to get POJOs in Python?

2020-06-05 Thread Andrew Munn
That's very helpful.  Thanks.  So it appears if I want to put in an object
using Java and consume it using Python I have to define the matching class
as done in that example.

Do you know how this is being used in practice?  Are people generally
kicking off a build job that looks at Java classes and performs code
generation to output Python version that get included in libs?

On Fri, Jun 5, 2020 at 7:04 AM Ilya Kasnacheev 
wrote:

> Hello!
>
> Please take a look at
> https://github.com/apache/ignite/blob/master/modules/platforms/python/examples/binary_basics.py
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> пт, 5 июн. 2020 г. в 01:38, Andrew Munn :
>
>> Thanks Ilya.  I don't see anything in that post about registering the
>> binary type.  I am not defining any tables using SQL.  I'm just
>> instantiating POJOs, putting them in the cache and then expecting to get
>> them in Python.  Can you tell me what else is required?  Is there some
>> process to register the binary type?  How can I view all registered binary
>> types?
>>
>> Thanks!
>>
>> On Wed, Jun 3, 2020 at 11:59 AM Ilya Kasnacheev <
>> ilya.kasnach...@gmail.com> wrote:
>>
>>> Hello!
>>>
>>> Have you tried the following example:
>>>
>>> https://github.com/apache/ignite/blob/master/modules/platforms/python/examples/read_binary.py
>>>
>>> (yes, it mostly works with tables, but tables and POJOs are mapped in
>>> the same fashion).
>>>
>>> Regards,
>>> --
>>> Ilya Kasnacheev
>>>
>>>
>>> ср, 3 июн. 2020 г. в 18:54, Andrew Munn :
>>>
 I'm having the same issues as these guys:


 http://mail-archives.apache.org/mod_mbox/ignite-user/201901.mbox/%3csn6pr14mb2240feb74bc77de79b54ca67ca...@sn6pr14mb2240.namprd14.prod.outlook.com%3E


 I would like to put POJOs in a map and get them using pyignite.  Python
 gives me ParseError('Binary type is not registered'). I was hoping
 that Ignite would automatically store any required schema info for the
 class so Python could use it. Especially if my simple POJO was composed
 only of primitives.

 Are there any examples of consuming POJOs from a cache using Python?

 Thanks




Re: UriDeployment Exception

2020-06-05 Thread marble.zh...@coinflex.com
Finally get works for this approach, it due to my maven package issue, thanks
a lot.

1. copy the dependency libs to ignite ./libs;
2. copy the package classes into the urideployment folder.

No need the ignite.xml, and no need to restart the server, it will use the
latest code. 

thanks again.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: UriDeployment Exception

2020-06-05 Thread Ilya Kasnacheev
Hello!

I guess you need to inherit all your service implementation from
org.apache.ignite.services.Service

Regards,
-- 
Ilya Kasnacheev


пт, 5 июн. 2020 г. в 15:01, marble.zh...@coinflex.com <
marble.zh...@coinflex.com>:

> hi Evgenii,
>
> After serveral tried, seems in the Jar package, need META-INF/ignite.xml
> descriptor, my one like is,
> ->
> http://www.springframework.org/schema/beans;
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
>xmlns:util="http://www.springframework.org/schema/util;
>xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans.xsd
> http://www.springframework.org/schema/util
> http://www.springframework.org/schema/util/spring-util.xsd;>
> Ignite Spring configuration file in
> gar-file.
>
>
> 
>
> com.marble.ignite.trade.igniteservice.SimpleMapServiceImpl
>
>
>
> 
> 
> 
> 
>
>
> but when deploy, found Caused by: java.lang.ClassCastException:
> com.marble.ignite.trade.igniteservice.SimpleMapServiceImpl cannot be cast
> to
> org.apache.ignite.services.Service
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>


Re: UriDeployment Exception

2020-06-05 Thread marble.zh...@coinflex.com
hi Evgenii, 

After serveral tried, seems in the Jar package, need META-INF/ignite.xml
descriptor, my one like is, 
->
http://www.springframework.org/schema/beans;
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
   xmlns:util="http://www.springframework.org/schema/util;
   xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd;>
Ignite Spring configuration file in gar-file.



   
com.marble.ignite.trade.igniteservice.SimpleMapServiceImpl
   








but when deploy, found Caused by: java.lang.ClassCastException:
com.marble.ignite.trade.igniteservice.SimpleMapServiceImpl cannot be cast to
org.apache.ignite.services.Service



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Ignite SqlFieldQuery Unicode Characters Support

2020-06-05 Thread Ravi Makwana
Hi,

We are using Apache ignite version 2.7 and we have one node cluster with
150 caches out of 150 We have 1 cache which contains Unicode characters
like Chinese language.

Server node is running on Linux OS & Client node is running on Windows OS.

Client side we are using sqlquery & sqlfieldquery to fetch and put &
data-streamer to insert data using .net ignite apis.

In ignite cache,we have AddressFull property which contains Unicode
characters like Chinese language so while inserting we have inserted
specified data into AddressFull property which is mentioned below.

*"北京市朝阳区安贞西里四区甲1号, 北京, 中国, 100011"*

While fetching data from ignite cache we have observed that we are not
getting inserted data properly.

We have performed below mentioned sqlquery using SqlFieldQuery.

SELECT HotelCode,AddressFull FROM HotelOtherLanguageMasterModel WHERE
HotelCode = '12345'

We got below mentioned result data for AddressFull property.

*"北京市�阳区安贞西里四区甲1�, 北京, 中国, 100011"*

Based on this test we have couple of questions on the same.

1) Is SqlFieldQuery .net api supporting Unicode characters?
2) If Yes, How do we overcome this issue?

Regards,
Ravi Makwana


Re: How to get POJOs in Python?

2020-06-05 Thread Ilya Kasnacheev
Hello!

Please take a look at
https://github.com/apache/ignite/blob/master/modules/platforms/python/examples/binary_basics.py

Regards,
-- 
Ilya Kasnacheev


пт, 5 июн. 2020 г. в 01:38, Andrew Munn :

> Thanks Ilya.  I don't see anything in that post about registering the
> binary type.  I am not defining any tables using SQL.  I'm just
> instantiating POJOs, putting them in the cache and then expecting to get
> them in Python.  Can you tell me what else is required?  Is there some
> process to register the binary type?  How can I view all registered binary
> types?
>
> Thanks!
>
> On Wed, Jun 3, 2020 at 11:59 AM Ilya Kasnacheev 
> wrote:
>
>> Hello!
>>
>> Have you tried the following example:
>>
>> https://github.com/apache/ignite/blob/master/modules/platforms/python/examples/read_binary.py
>>
>> (yes, it mostly works with tables, but tables and POJOs are mapped in the
>> same fashion).
>>
>> Regards,
>> --
>> Ilya Kasnacheev
>>
>>
>> ср, 3 июн. 2020 г. в 18:54, Andrew Munn :
>>
>>> I'm having the same issues as these guys:
>>>
>>>
>>> http://mail-archives.apache.org/mod_mbox/ignite-user/201901.mbox/%3csn6pr14mb2240feb74bc77de79b54ca67ca...@sn6pr14mb2240.namprd14.prod.outlook.com%3E
>>>
>>>
>>> I would like to put POJOs in a map and get them using pyignite.  Python
>>> gives me ParseError('Binary type is not registered'). I was hoping that
>>> Ignite would automatically store any required schema info for the class so
>>> Python could use it. Especially if my simple POJO was composed only of
>>> primitives.
>>>
>>> Are there any examples of consuming POJOs from a cache using Python?
>>>
>>> Thanks
>>>
>>>


Ignite node log file setup

2020-06-05 Thread kay
Hello, I set up log4j2.xml and I found a create log file with sys:nodeId.

I configured grid name like 

cache-node-01, cache-node-02 using xml confiuration(property
name="igniteInstanceName" value="cache-node-01")

Is there any way to setup log file with grid name.

for example) ignite-cache-node-01.log

Thank you so much





--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: UriDeployment Question

2020-06-05 Thread marble.zh...@coinflex.com
complete exception is like below, 

Exception in thread "grid-uri-scanner-#2" java.lang.NoClassDefFoundError:
org/osgi/service/jdbc/DataSourceFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentClassLoader.loadClass(GridUriDeploymentClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentFileResourceLoader.createResource(GridUriDeploymentFileResourceLoader.java:72)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentDiscovery.findResourcesInDirectory(GridUriDeploymentDiscovery.java:109)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentDiscovery.findResourcesInDirectory(GridUriDeploymentDiscovery.java:103)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentDiscovery.findResourcesInDirectory(GridUriDeploymentDiscovery.java:103)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentDiscovery.findResourcesInDirectory(GridUriDeploymentDiscovery.java:103)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentDiscovery.getClasses(GridUriDeploymentDiscovery.java:71)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentFileProcessor.processNoDescriptorFile(GridUriDeploymentFileProcessor.java:388)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentFileProcessor.processFile(GridUriDeploymentFileProcessor.java:108)
at
org.apache.ignite.spi.deployment.uri.UriDeploymentSpi$2.onNewOrUpdatedFile(UriDeploymentSpi.java:587)
at
org.apache.ignite.spi.deployment.uri.scanners.file.UriDeploymentFileScanner$URIContext.handleFile(UriDeploymentFileScanner.java:268)
at
org.apache.ignite.spi.deployment.uri.scanners.file.UriDeploymentFileScanner$URIContext.access$200(UriDeploymentFileScanner.java:135)
at
org.apache.ignite.spi.deployment.uri.scanners.file.UriDeploymentFileScanner$URIContext$1.handle(UriDeploymentFileScanner.java:178)
at
org.apache.ignite.spi.deployment.uri.scanners.GridDeploymentFolderScannerHelper.scanFolder(GridDeploymentFolderScannerHelper.java:49)
at
org.apache.ignite.spi.deployment.uri.scanners.GridDeploymentFolderScannerHelper.scanFolder(GridDeploymentFolderScannerHelper.java:52)
at
org.apache.ignite.spi.deployment.uri.scanners.file.UriDeploymentFileScanner$URIContext.scan(UriDeploymentFileScanner.java:183)
at
org.apache.ignite.spi.deployment.uri.scanners.file.UriDeploymentFileScanner$URIContext.access$000(UriDeploymentFileScanner.java:135)
at
org.apache.ignite.spi.deployment.uri.scanners.file.UriDeploymentFileScanner.scan(UriDeploymentFileScanner.java:73)
at
org.apache.ignite.spi.deployment.uri.scanners.UriDeploymentScannerManager$1.body(UriDeploymentScannerManager.java:115)
at org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:61)
Caused by: java.lang.ClassNotFoundException:
org.osgi.service.jdbc.DataSourceFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at
org.apache.ignite.spi.deployment.uri.GridUriDeploymentClassLoader.loadClass(GridUriDeploymentClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/