You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Andrew Munn <mu...@gmail.com> on 2020/06/03 15:54:14 UTC
How to get POJOs in Python?
I'm having the same issues as these guys:
http://mail-archives.apache.org/mod_mbox/ignite-user/201901.mbox/%3CSN6PR14MB2240FEB74BC77DE79B54CA67CA910@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?
Posted by Andrew Munn <mu...@gmail.com>.
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 <il...@gmail.com>
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 <mu...@gmail.com>:
>
>> 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 <il...@gmail.com>
>> 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 <mu...@gmail.com>:
>>>
>>>> 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.kasnacheev@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 <mu...@gmail.com>:
>>>>>
>>>>>> I'm having the same issues as these guys:
>>>>>>
>>>>>>
>>>>>> http://mail-archives.apache.org/mod_mbox/ignite-user/201901.mbox/%3CSN6PR14MB2240FEB74BC77DE79B54CA67CA910@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?
Posted by Ilya Kasnacheev <il...@gmail.com>.
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 <mu...@gmail.com>:
> 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 <il...@gmail.com>
> 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 <mu...@gmail.com>:
>>
>>> 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.kasnacheev@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 <mu...@gmail.com>:
>>>>
>>>>> I'm having the same issues as these guys:
>>>>>
>>>>>
>>>>> http://mail-archives.apache.org/mod_mbox/ignite-user/201901.mbox/%3CSN6PR14MB2240FEB74BC77DE79B54CA67CA910@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?
Posted by Andrew Munn <mu...@gmail.com>.
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 <il...@gmail.com>
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 <mu...@gmail.com>:
>
>> 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.kasnacheev@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 <mu...@gmail.com>:
>>>
>>>> I'm having the same issues as these guys:
>>>>
>>>>
>>>> http://mail-archives.apache.org/mod_mbox/ignite-user/201901.mbox/%3CSN6PR14MB2240FEB74BC77DE79B54CA67CA910@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?
Posted by Ilya Kasnacheev <il...@gmail.com>.
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 <mu...@gmail.com>:
> 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 <il...@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 <mu...@gmail.com>:
>>
>>> I'm having the same issues as these guys:
>>>
>>>
>>> http://mail-archives.apache.org/mod_mbox/ignite-user/201901.mbox/%3CSN6PR14MB2240FEB74BC77DE79B54CA67CA910@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?
Posted by Andrew Munn <mu...@gmail.com>.
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 <il...@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 <mu...@gmail.com>:
>
>> I'm having the same issues as these guys:
>>
>>
>> http://mail-archives.apache.org/mod_mbox/ignite-user/201901.mbox/%3CSN6PR14MB2240FEB74BC77DE79B54CA67CA910@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?
Posted by Ilya Kasnacheev <il...@gmail.com>.
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 <mu...@gmail.com>:
> I'm having the same issues as these guys:
>
>
> http://mail-archives.apache.org/mod_mbox/ignite-user/201901.mbox/%3CSN6PR14MB2240FEB74BC77DE79B54CA67CA910@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
>
>