You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Айсина Роза Мунеровна <ro...@sbermarket.ru> on 2022/12/20 10:35:50 UTC

Can't access binary key from Python client

Hola!
I can’t get data by key in Python in caches created in Java with binary objects.

1. Cache was created though DDL in SQL API:

CREATE TABLE IF NOT EXISTS PUBLIC.ProductFeatures
(
     product_sku INT PRIMARY KEY,
     total_cnt_orders_with_sku INT
)
WITH "CACHE_NAME=PUBLIC_ProductFeatures,
     KEY_TYPE=io.sbmt.ProductFeaturesKey,
     VALUE_TYPE=io.sbmt.ProductFeaturesValue,
     AFFINITY_KEY=product_sku,
     TEMPLATE=PARTITIONED,
     BACKUPS=1”

2. Java apps uploads data to this cache through Key-Value API with binary object underneath:

ClientCache<BinaryObject, BinaryObject> igniteCache = igniteClient
     .cache(config.getCacheName())
     .withKeepBinary();

final BinaryObjectBuilder keyBuilder = igniteClient.binary().builder(config.getKeyType());
final BinaryObjectBuilder valueBuilder = igniteClient.binary().builder(config.getValueType());

keyBuilder.setField(column.name, id);
valueBuilder.setField(column.name, id);

final BinaryObject key = keyBuilder.build();
final BinaryObject value = valueBuilder.build();

igniteCache.put(key, value);


3. In Python client I create Complex Object class and try to get data from this cache:


class IoSbmtProductFeaturesKey(
    metaclass=GenericObjectMeta,
    schema={
        'product_sku': IntObject
    },
    type_name='io.sbmt.ProductFeaturesKey'
):
    pass


ignite_client.register_binary_type(IoSbmtProductFeaturesKey)

key = IoSbmtProductFeaturesKey(product_sku=15052004)
cache = ignite_client.get_cache("PUBLIC_ProductFeatures")
value = cache.get(key)

cursor = cache.scan(partitions=1)  # to check that key really exists
true_key, true_value = next(cursor)

What I see:

>>> true_key
IoSbmtProductFeaturesKey(product_sku=15052004, version=1)
>>> key
IoSbmtProductFeaturesKey(product_sku=15052004, version=1)
>>> true_key == key
True
>>> cache.get(true_key)
IoSbmtProductFeaturesValue(total_cnt_orders_with_sku=12, version=1)
>>> cache.get(true_key) == true_value
True
>>> cache.get(key)
>>> type(cache.get(key))
<class 'NoneType'>

So I can’t create Python analogue of Java binary class that is stored as key in the cache.
I tried also to change case in schema of python class, check all this on cache with composite key, to not specify type_id - nothing helps :(

Please help.


--

Роза Айсина

Старший разработчик ПО

СберМаркет | Доставка из любимых магазинов



Email: roza.aysina@sbermarket.ru<ma...@sbermarket.ru>

Mob:

Web: sbermarket.ru<https://sbermarket.ru/>

App: iOS<https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457> и Android<https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>



УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ: это электронное сообщение и любые документы, приложенные к нему, содержат конфиденциальную информацию. Настоящим уведомляем Вас о том, что, если это сообщение не предназначено Вам, использование, копирование, распространение информации, содержащейся в настоящем сообщении, а также осуществление любых действий на основе этой информации, строго запрещено. Если Вы получили это сообщение по ошибке, пожалуйста, сообщите об этом отправителю по электронной почте и удалите это сообщение.
CONFIDENTIALITY NOTICE: This email and any files attached to it are confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email.

Re: [!!Массовая рассылка]Can't access binary key from Python client

Posted by Ivan Daschinsky <iv...@gmail.com>.
It depends. If your data in cluster is already with compactFooter=false (if
you use old java client where compactFooter is false by default and all
your data were ingested by this client)
, you should disable it in python like this:
client = Client(compact_footer=False)

Actually, this discrepancy of binary configuration is a really bad thing.





чт, 22 дек. 2022 г. в 12:20, Айсина Роза Мунеровна <
roza.aysina@sbermarket.ru>:

> Hi Ivan!
>
> Thank you for your reply!
>
> I tested your snippets with client and server node.
> When I raise server node in the snippet - everything works as expected,
> the same output (key exists).
> When I raise cluster manually on localhost and raise client node in the
> snippet - I have None in output.
>
> I used this dependency:
> pyignite = "0.5.2”  in Python
> implementation group: 'org.apache.ignite', name: 'ignite-core', version:
> ‘2.13.0’ in Java
>
> The same version that we have for production cluster.
>
> So how can I fix this? And where - in Python connection or server config?
>
> Thanks!
>
>
> On 22 Dec 2022, at 10:40 AM, Ivan Daschinsky <iv...@gmail.com> wrote:
>
> Внимание: Внешний отправитель!
> Если вы не знаете отправителя - не открывайте вложения, не переходите по
> ссылкам, не пересылайте письмо!
>
> Firstly, please run the java snippet, then run the python snippet
> I got this output:
> /home/ivandasch/.virtualenvs/pyignite-py38/bin/python
> /home/ivandasch/.config/JetBrains/PyCharm2022.2/scratches/scratch.py
> ValueType(name='test', version=1)
>
> чт, 22 дек. 2022 г. в 10:40, Ivan Daschinsky <iv...@gmail.com>:
>
>> Just tried on (ignite 2.13.0 server, ignite-client on master, pyignite on
>> 0.6.0)
>>
>> Java code:
>>
>> import org.apache.ignite.Ignition;
>> import org.apache.ignite.binary.BinaryObject;
>> import org.apache.ignite.client.ClientCache;
>> import org.apache.ignite.client.IgniteClient;
>> import org.apache.ignite.configuration.ClientConfiguration;
>>
>> class Scratch {
>>     public static void main(String[] args) {
>>         try (IgniteClient client = Ignition.startClient(new
>> ClientConfiguration()
>>             .setAddresses("127.0.0.1:10800", "127.0.0.1:10801", "
>> 127.0.0.1:10802"))) {
>>
>>             ClientCache<Object, Object> cache =
>> client.getOrCreateCache("test").withKeepBinary();
>>
>>             BinaryObject key =
>> client.binary().builder("KeyType").setField("id", 10,
>> Integer.class).build();
>>             BinaryObject val =
>> client.binary().builder("ValueType").setField("name", "test",
>> String.class).build();
>>
>>             cache.put(key, val);
>>         }
>>     }
>> }
>>
>> Python code:
>>
>> from pyignite import Client
>> from pyignite import GenericObjectMeta
>> from pyignite.datatypes import IntObject, String
>>
>> class Key(
>>     metaclass=GenericObjectMeta,
>>     type_name="KeyType",
>>     schema={
>>         'id': IntObject,
>>     },
>>     version=1,
>> ):
>>     pass
>>
>> class Value(
>>     metaclass=GenericObjectMeta,
>>     type_name="ValueType",
>>     schema={
>>         'name': String,
>>     },
>>     version=1,
>> ):
>>     pass
>>
>> client = Client()
>> client.connect([('127.0.0.1', 10800 + i) for i in range(0, 3)])
>> cache = client.get_or_create_cache("test")
>>
>> print(cache.get(Key(id=10)))
>>
>> Everything works as expected.
>>
>> I guess that you used the version of ignite-core (thin-client) older than
>> 2.14.0.
>> In that version, compactFooter equals to false, but on server side and
>> pyignite it is by default enabled.
>>
>> But pyignite has an ability to detect this param after fetching the data.
>> That is the reason why you code started working after fetching few data by
>> a scan query.
>>
>> чт, 22 дек. 2022 г. в 09:13, Ivan Daschinsky <iv...@gmail.com>:
>>
>>> Couls you please specify the exact versions of pyignite and ignite-core
>>> (java thin client)?
>>>
>>> ср, 21 дек. 2022 г., 18:36 Айсина Роза Мунеровна <
>>> roza.aysina@sbermarket.ru>:
>>>
>>>> Hola again!
>>>>
>>>> I accidently discovered some strange behaviour when trying to get value
>>>> by key in Python.
>>>>
>>>> I do this in part 3:
>>>>
>>>> cache = ignite_client.get_cache("PUBLIC_ProductFeatures")
>>>> key = IoSbmtProductFeaturesKey(product_sku=15052004)
>>>> cursor = cache.scan(partitions=1)
>>>>
>>>> # Uncomment to see error
>>>> # value = cache.get(key)
>>>>
>>>> true_key, true_value = next(cursor)  # THIS LINE IS CRUCIAL!!!11
>>>> print("true_key:  ", true_key)
>>>> print("true_value:", true_value)
>>>>
>>>> value = cache.get(key)
>>>>
>>>>
>>>> So if data from cursor is read first then everything works as expected.
>>>> If there is no cursor or reading data from it happens AFTER
>>>> cache.get(key) - everything fails and key is not found.
>>>>
>>>> Is it ok?
>>>> Maybe there is some dynamic binding of classes?
>>>> Looks really weird.
>>>>
>>>> Help please!
>>>>
>>>> On 20 Dec 2022, at 1:35 PM, Айсина Роза Мунеровна <
>>>> roza.aysina@sbermarket.ru> wrote:
>>>>
>>>> Hola!
>>>> I can’t get data by key in Python in caches created in Java with binary
>>>> objects.
>>>>
>>>> 1. Cache was created though DDL in SQL API:
>>>>
>>>> CREATE TABLE IF NOT EXISTS PUBLIC.ProductFeatures
>>>> (
>>>>      product_sku INT PRIMARY KEY,
>>>>      total_cnt_orders_with_sku INT
>>>> )
>>>> WITH "CACHE_NAME=PUBLIC_ProductFeatures,
>>>>      KEY_TYPE=io.sbmt.ProductFeaturesKey,
>>>>      VALUE_TYPE=io.sbmt.ProductFeaturesValue,
>>>>      AFFINITY_KEY=product_sku,
>>>>      TEMPLATE=PARTITIONED,
>>>>      BACKUPS=1”
>>>>
>>>> 2. Java apps uploads data to this cache through Key-Value API with
>>>> binary object underneath:
>>>>
>>>> ClientCache<BinaryObject, BinaryObject> igniteCache = igniteClient
>>>>      .cache(config.getCacheName())
>>>>      .withKeepBinary();
>>>>
>>>> final BinaryObjectBuilder keyBuilder =
>>>> igniteClient.binary().builder(config.getKeyType());
>>>> final BinaryObjectBuilder valueBuilder =
>>>> igniteClient.binary().builder(config.getValueType());
>>>>
>>>> keyBuilder.setField(column.name, id);
>>>> valueBuilder.setField(column.name, id);
>>>>
>>>> final BinaryObject key = keyBuilder.build();
>>>> final BinaryObject value = valueBuilder.build();
>>>>
>>>> igniteCache.put(key, value);
>>>>
>>>>
>>>> 3. In Python client I create Complex Object class and try to get data
>>>> from this cache:
>>>>
>>>> class IoSbmtProductFeaturesKey(
>>>>     metaclass=GenericObjectMeta,
>>>>     schema={
>>>>         'product_sku': IntObject
>>>>     },
>>>>     type_name='io.sbmt.ProductFeaturesKey'
>>>> ):
>>>>     pass
>>>>
>>>>
>>>> ignite_client.register_binary_type(IoSbmtProductFeaturesKey)
>>>>
>>>> key = IoSbmtProductFeaturesKey(product_sku=15052004)
>>>> cache = ignite_client.get_cache("PUBLIC_ProductFeatures")
>>>> value = cache.get(key)
>>>>
>>>> cursor = cache.scan(partitions=1)  # to check that key really exists
>>>> true_key, true_value = next(cursor)
>>>>
>>>>
>>>> What I see:
>>>>
>>>> >>> *true_key*
>>>> IoSbmtProductFeaturesKey(product_sku=15052004, version=1)
>>>> >>> *key*
>>>> IoSbmtProductFeaturesKey(product_sku=15052004, version=1)
>>>> >>> *true_key == key*
>>>> True
>>>> >>> *cache.get(true_key)*
>>>> IoSbmtProductFeaturesValue(total_cnt_orders_with_sku=12, version=1)
>>>> >>> *cache.get(true_key) == true_value*
>>>> True
>>>> >>> *cache.get(key)*
>>>> >>> *type(cache.get(key))*
>>>> <class 'NoneType'>
>>>>
>>>> So I can’t create Python analogue of Java binary class that is stored
>>>> as key in the cache.
>>>> I tried also to change case in schema of python class, check all this
>>>> on cache with composite key, to not specify *type_id* - nothing helps
>>>> :(
>>>>
>>>> Please help.
>>>>
>>>> *--*
>>>>
>>>> *Роза Айсина*
>>>> Старший разработчик ПО
>>>> *СберМаркет* | Доставка из любимых магазинов
>>>>
>>>>
>>>> Email: roza.aysina@sbermarket.ru
>>>> Mob:
>>>> Web: sbermarket.ru
>>>> App: iOS
>>>> <https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457>
>>>>  и Android
>>>> <https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ:* это электронное сообщение и любые
>>>> документы, приложенные к нему, содержат конфиденциальную информацию.
>>>> Настоящим уведомляем Вас о том, что, если это сообщение не предназначено
>>>> Вам, использование, копирование, распространение информации, содержащейся в
>>>> настоящем сообщении, а также осуществление любых действий на основе этой
>>>> информации, строго запрещено. Если Вы получили это сообщение по ошибке,
>>>> пожалуйста, сообщите об этом отправителю по электронной почте и удалите это
>>>> сообщение.
>>>> *CONFIDENTIALITY NOTICE:* This email and any files attached to it are
>>>> confidential. If you are not the intended recipient you are notified that
>>>> using, copying, distributing or taking any action in reliance on the
>>>> contents of this information is strictly prohibited. If you have received
>>>> this email in error please notify the sender and delete this email.
>>>> *--*
>>>>
>>>> *Роза Айсина*
>>>> Старший разработчик ПО
>>>> *СберМаркет* | Доставка из любимых магазинов
>>>>
>>>>
>>>> Email: roza.aysina@sbermarket.ru
>>>> Mob:
>>>> Web: sbermarket.ru
>>>> App: iOS
>>>> <https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457>
>>>>  и Android
>>>> <https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *--*
>>>>
>>>> *Роза Айсина*
>>>> Старший разработчик ПО
>>>> *СберМаркет* | Доставка из любимых магазинов
>>>>
>>>>
>>>> Email: roza.aysina@sbermarket.ru
>>>> Mob:
>>>> Web: sbermarket.ru
>>>> App: iOS
>>>> <https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457>
>>>>  и Android
>>>> <https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ:* это электронное сообщение и любые
>>>> документы, приложенные к нему, содержат конфиденциальную информацию.
>>>> Настоящим уведомляем Вас о том, что, если это сообщение не предназначено
>>>> Вам, использование, копирование, распространение информации, содержащейся в
>>>> настоящем сообщении, а также осуществление любых действий на основе этой
>>>> информации, строго запрещено. Если Вы получили это сообщение по ошибке,
>>>> пожалуйста, сообщите об этом отправителю по электронной почте и удалите это
>>>> сообщение.
>>>> *CONFIDENTIALITY NOTICE:* This email and any files attached to it are
>>>> confidential. If you are not the intended recipient you are notified that
>>>> using, copying, distributing or taking any action in reliance on the
>>>> contents of this information is strictly prohibited. If you have received
>>>> this email in error please notify the sender and delete this email.
>>>>
>>>
>>
>> --
>> Sincerely yours, Ivan Daschinskiy
>>
>
>
> --
> Sincerely yours, Ivan Daschinskiy
>
>
> *--*
>
> *Роза Айсина*
>
> Старший разработчик ПО
>
> *СберМаркет* | Доставка из любимых магазинов
>
>
>
> Email: roza.aysina@sbermarket.ru
>
> Mob:
>
> Web: sbermarket.ru
>
> App: iOS
> <https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457>
> и Android
> <https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>
>
>
>
> *УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ:* это электронное сообщение и любые
> документы, приложенные к нему, содержат конфиденциальную информацию.
> Настоящим уведомляем Вас о том, что, если это сообщение не предназначено
> Вам, использование, копирование, распространение информации, содержащейся в
> настоящем сообщении, а также осуществление любых действий на основе этой
> информации, строго запрещено. Если Вы получили это сообщение по ошибке,
> пожалуйста, сообщите об этом отправителю по электронной почте и удалите это
> сообщение.
> *CONFIDENTIALITY NOTICE:* This email and any files attached to it are
> confidential. If you are not the intended recipient you are notified that
> using, copying, distributing or taking any action in reliance on the
> contents of this information is strictly prohibited. If you have received
> this email in error please notify the sender and delete this email.
>


-- 
Sincerely yours, Ivan Daschinskiy

Re: [!!Массовая рассылка]Can't access binary key from Python client

Posted by Ivan Daschinsky <iv...@gmail.com>.
I am afraid, that if you already have ingested your data using old thin
java client, you have no choice but set compact_footer=False to pyignite.

чт, 22 дек. 2022 г. в 14:45, Айсина Роза Мунеровна <
roza.aysina@sbermarket.ru>:

> Oh, we can’t migrate to newer version, so for consistency we will set
> compact_footer = True currently for our thin java client.
>
> Thank you very much for your help!
>
> On 22 Dec 2022, at 2:08 PM, Ivan Daschinsky <iv...@gmail.com> wrote:
>
> It is required only for older java client. If you choose client version
> 2.14.0, everything will work automatically. Otherwise, it is advisable to
> set up this flag manually.
> For pyignite it is not required to specify it, it is up to you.
>
> чт, 22 дек. 2022 г. в 13:42, Айсина Роза Мунеровна <
> roza.aysina@sbermarket.ru>:
>
>> Okay, I got that. Thank you for your explanation!
>>
>> Will it be wright and more consistent to set up *compact_footer = True*
>> both in application that creates and fills data (java thin client) and in
>> python client explicitly?
>> Should I somehow put this flag on server config?
>>
>>
>> On 22 Dec 2022, at 1:18 PM, Ivan Daschinsky <iv...@gmail.com> wrote:
>>
>> Внимание: Внешний отправитель!
>> Если вы не знаете отправителя - не открывайте вложения, не переходите по
>> ссылкам, не пересылайте письмо!
>>
>> Actually, cache doesn't care about what you put inside it. This is just a
>> configuration of serialization. And this parameter must be the same
>> throughout the cluster. Otherwise, surprises will arise undoubtedly
>>
>>
>>
>> *--*
>>
>> *Роза Айсина*
>> Старший разработчик ПО
>> *СберМаркет* | Доставка из любимых магазинов
>>
>>
>> Email: roza.aysina@sbermarket.ru
>> Mob:
>> Web: sbermarket.ru
>> App: iOS
>> <https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457>
>> и Android
>> <https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>
>>
>>
>>
>>
>>
>>
>> *УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ:* это электронное сообщение и любые
>> документы, приложенные к нему, содержат конфиденциальную информацию.
>> Настоящим уведомляем Вас о том, что, если это сообщение не предназначено
>> Вам, использование, копирование, распространение информации, содержащейся в
>> настоящем сообщении, а также осуществление любых действий на основе этой
>> информации, строго запрещено. Если Вы получили это сообщение по ошибке,
>> пожалуйста, сообщите об этом отправителю по электронной почте и удалите это
>> сообщение.
>> *CONFIDENTIALITY NOTICE:* This email and any files attached to it are
>> confidential. If you are not the intended recipient you are notified that
>> using, copying, distributing or taking any action in reliance on the
>> contents of this information is strictly prohibited. If you have received
>> this email in error please notify the sender and delete this email.
>>
>
>
> --
> Sincerely yours, Ivan Daschinskiy
>
>
> *--*
>
> *Роза Айсина*
>
> Старший разработчик ПО
>
> *СберМаркет* | Доставка из любимых магазинов
>
>
>
> Email: roza.aysina@sbermarket.ru
>
> Mob:
>
> Web: sbermarket.ru
>
> App: iOS
> <https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457>
> и Android
> <https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>
>
>
>
> *УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ:* это электронное сообщение и любые
> документы, приложенные к нему, содержат конфиденциальную информацию.
> Настоящим уведомляем Вас о том, что, если это сообщение не предназначено
> Вам, использование, копирование, распространение информации, содержащейся в
> настоящем сообщении, а также осуществление любых действий на основе этой
> информации, строго запрещено. Если Вы получили это сообщение по ошибке,
> пожалуйста, сообщите об этом отправителю по электронной почте и удалите это
> сообщение.
> *CONFIDENTIALITY NOTICE:* This email and any files attached to it are
> confidential. If you are not the intended recipient you are notified that
> using, copying, distributing or taking any action in reliance on the
> contents of this information is strictly prohibited. If you have received
> this email in error please notify the sender and delete this email.
>


-- 
Sincerely yours, Ivan Daschinskiy

Re: [!!Массовая рассылка]Can't access binary key from Python client

Posted by Айсина Роза Мунеровна <ro...@sbermarket.ru>.
Oh, we can’t migrate to newer version, so for consistency we will set compact_footer = True currently for our thin java client.

Thank you very much for your help!

On 22 Dec 2022, at 2:08 PM, Ivan Daschinsky <iv...@gmail.com> wrote:

It is required only for older java client. If you choose client version 2.14.0, everything will work automatically. Otherwise, it is advisable to set up this flag manually.
For pyignite it is not required to specify it, it is up to you.

чт, 22 дек. 2022 г. в 13:42, Айсина Роза Мунеровна <ro...@sbermarket.ru>>:
Okay, I got that. Thank you for your explanation!

Will it be wright and more consistent to set up compact_footer = True both in application that creates and fills data (java thin client) and in python client explicitly?
Should I somehow put this flag on server config?


On 22 Dec 2022, at 1:18 PM, Ivan Daschinsky <iv...@gmail.com>> wrote:

Внимание: Внешний отправитель!
Если вы не знаете отправителя - не открывайте вложения, не переходите по ссылкам, не пересылайте письмо!

Actually, cache doesn't care about what you put inside it. This is just a configuration of serialization. And this parameter must be the same throughout the cluster. Otherwise, surprises will arise undoubtedly



--

Роза Айсина
Старший разработчик ПО
СберМаркет | Доставка из любимых магазинов



Email: roza.aysina@sbermarket.ru<ma...@sbermarket.ru>
Mob:
Web: sbermarket.ru<https://sbermarket.ru/>
App: iOS<https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457> и Android<https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>








УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ: это электронное сообщение и любые документы, приложенные к нему, содержат конфиденциальную информацию. Настоящим уведомляем Вас о том, что, если это сообщение не предназначено Вам, использование, копирование, распространение информации, содержащейся в настоящем сообщении, а также осуществление любых действий на основе этой информации, строго запрещено. Если Вы получили это сообщение по ошибке, пожалуйста, сообщите об этом отправителю по электронной почте и удалите это сообщение.
CONFIDENTIALITY NOTICE: This email and any files attached to it are confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email.


--
Sincerely yours, Ivan Daschinskiy


--

Роза Айсина

Старший разработчик ПО

СберМаркет | Доставка из любимых магазинов



Email: roza.aysina@sbermarket.ru<ma...@sbermarket.ru>

Mob:

Web: sbermarket.ru<https://sbermarket.ru/>

App: iOS<https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457> и Android<https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>



УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ: это электронное сообщение и любые документы, приложенные к нему, содержат конфиденциальную информацию. Настоящим уведомляем Вас о том, что, если это сообщение не предназначено Вам, использование, копирование, распространение информации, содержащейся в настоящем сообщении, а также осуществление любых действий на основе этой информации, строго запрещено. Если Вы получили это сообщение по ошибке, пожалуйста, сообщите об этом отправителю по электронной почте и удалите это сообщение.
CONFIDENTIALITY NOTICE: This email and any files attached to it are confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email.

Re: [!!Массовая рассылка]Can't access binary key from Python client

Posted by Ivan Daschinsky <iv...@gmail.com>.
It is required only for older java client. If you choose client version
2.14.0, everything will work automatically. Otherwise, it is advisable to
set up this flag manually.
For pyignite it is not required to specify it, it is up to you.

чт, 22 дек. 2022 г. в 13:42, Айсина Роза Мунеровна <
roza.aysina@sbermarket.ru>:

> Okay, I got that. Thank you for your explanation!
>
> Will it be wright and more consistent to set up *compact_footer = True*
> both in application that creates and fills data (java thin client) and in
> python client explicitly?
> Should I somehow put this flag on server config?
>
>
> On 22 Dec 2022, at 1:18 PM, Ivan Daschinsky <iv...@gmail.com> wrote:
>
> Внимание: Внешний отправитель!
> Если вы не знаете отправителя - не открывайте вложения, не переходите по
> ссылкам, не пересылайте письмо!
>
> Actually, cache doesn't care about what you put inside it. This is just a
> configuration of serialization. And this parameter must be the same
> throughout the cluster. Otherwise, surprises will arise undoubtedly
>
>
>
> *--*
>
> *Роза Айсина*
>
> Старший разработчик ПО
>
> *СберМаркет* | Доставка из любимых магазинов
>
>
>
> Email: roza.aysina@sbermarket.ru
>
> Mob:
>
> Web: sbermarket.ru
>
> App: iOS
> <https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457>
> и Android
> <https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>
>
>
>
> *УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ:* это электронное сообщение и любые
> документы, приложенные к нему, содержат конфиденциальную информацию.
> Настоящим уведомляем Вас о том, что, если это сообщение не предназначено
> Вам, использование, копирование, распространение информации, содержащейся в
> настоящем сообщении, а также осуществление любых действий на основе этой
> информации, строго запрещено. Если Вы получили это сообщение по ошибке,
> пожалуйста, сообщите об этом отправителю по электронной почте и удалите это
> сообщение.
> *CONFIDENTIALITY NOTICE:* This email and any files attached to it are
> confidential. If you are not the intended recipient you are notified that
> using, copying, distributing or taking any action in reliance on the
> contents of this information is strictly prohibited. If you have received
> this email in error please notify the sender and delete this email.
>


-- 
Sincerely yours, Ivan Daschinskiy

Re: [!!Массовая рассылка]Can't access binary key from Python client

Posted by Айсина Роза Мунеровна <ro...@sbermarket.ru>.
Okay, I got that. Thank you for your explanation!

Will it be wright and more consistent to set up compact_footer = True both in application that creates and fills data (java thin client) and in python client explicitly?
Should I somehow put this flag on server config?


On 22 Dec 2022, at 1:18 PM, Ivan Daschinsky <iv...@gmail.com> wrote:

Внимание: Внешний отправитель!
Если вы не знаете отправителя - не открывайте вложения, не переходите по ссылкам, не пересылайте письмо!

Actually, cache doesn't care about what you put inside it. This is just a configuration of serialization. And this parameter must be the same throughout the cluster. Otherwise, surprises will arise undoubtedly




--

Роза Айсина

Старший разработчик ПО

СберМаркет | Доставка из любимых магазинов



Email: roza.aysina@sbermarket.ru<ma...@sbermarket.ru>

Mob:

Web: sbermarket.ru<https://sbermarket.ru/>

App: iOS<https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457> и Android<https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>



УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ: это электронное сообщение и любые документы, приложенные к нему, содержат конфиденциальную информацию. Настоящим уведомляем Вас о том, что, если это сообщение не предназначено Вам, использование, копирование, распространение информации, содержащейся в настоящем сообщении, а также осуществление любых действий на основе этой информации, строго запрещено. Если Вы получили это сообщение по ошибке, пожалуйста, сообщите об этом отправителю по электронной почте и удалите это сообщение.
CONFIDENTIALITY NOTICE: This email and any files attached to it are confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email.

Re: [!!Массовая рассылка]Can't access binary key from Python client

Posted by Ivan Daschinsky <iv...@gmail.com>.
Actually, cache doesn't care about what you put inside it. This is just a
configuration of serialization. And this parameter must be the same
throughout the cluster. Otherwise, surprises will arise undoubtedly

Re: [!!Массовая рассылка]Can't access binary key from Python client

Posted by Айсина Роза Мунеровна <ro...@sbermarket.ru>.
Oh, should I enable compact footer flag in thin client that actually creates caches in our cluster?

Like this

final ClientConfiguration cfg = new ClientConfiguration()
    .setAddresses(addresses)
    .setBinaryConfiguration(new BinaryConfiguration().setCompactFooter(true));
?

Thanks!

On 22 Dec 2022, at 12:20 PM, Айсина Роза Мунеровна <ro...@sbermarket.ru> wrote:

Hi Ivan!

Thank you for your reply!

I tested your snippets with client and server node.
When I raise server node in the snippet - everything works as expected, the same output (key exists).
When I raise cluster manually on localhost and raise client node in the snippet - I have None in output.

I used this dependency:
pyignite = "0.5.2”  in Python
implementation group: 'org.apache.ignite', name: 'ignite-core', version: ‘2.13.0’ in Java

The same version that we have for production cluster.

So how can I fix this? And where - in Python connection or server config?

Thanks!


On 22 Dec 2022, at 10:40 AM, Ivan Daschinsky <iv...@gmail.com> wrote:

Внимание: Внешний отправитель!
Если вы не знаете отправителя - не открывайте вложения, не переходите по ссылкам, не пересылайте письмо!

Firstly, please run the java snippet, then run the python snippet
I got this output:
/home/ivandasch/.virtualenvs/pyignite-py38/bin/python /home/ivandasch/.config/JetBrains/PyCharm2022.2/scratches/scratch.py
ValueType(name='test', version=1)

чт, 22 дек. 2022 г. в 10:40, Ivan Daschinsky <iv...@gmail.com>>:
Just tried on (ignite 2.13.0 server, ignite-client on master, pyignite on 0.6.0)

Java code:

import org.apache.ignite.Ignition;
import org.apache.ignite.binary.BinaryObject;
import org.apache.ignite.client.ClientCache;
import org.apache.ignite.client.IgniteClient;
import org.apache.ignite.configuration.ClientConfiguration;

class Scratch {
    public static void main(String[] args) {
        try (IgniteClient client = Ignition.startClient(new ClientConfiguration()
            .setAddresses("127.0.0.1:10800<http://127.0.0.1:10800/>", "127.0.0.1:10801<http://127.0.0.1:10801/>", "127.0.0.1:10802<http://127.0.0.1:10802/>"))) {

            ClientCache<Object, Object> cache = client.getOrCreateCache("test").withKeepBinary();

            BinaryObject key = client.binary().builder("KeyType").setField("id", 10, Integer.class).build();
            BinaryObject val = client.binary().builder("ValueType").setField("name", "test", String.class).build();

            cache.put(key, val);
        }
    }
}

Python code:

from pyignite import Client
from pyignite import GenericObjectMeta
from pyignite.datatypes import IntObject, String

class Key(
    metaclass=GenericObjectMeta,
    type_name="KeyType",
    schema={
        'id': IntObject,
    },
    version=1,
):
    pass

class Value(
    metaclass=GenericObjectMeta,
    type_name="ValueType",
    schema={
        'name': String,
    },
    version=1,
):
    pass

client = Client()
client.connect([('127.0.0.1', 10800 + i) for i in range(0, 3)])
cache = client.get_or_create_cache("test")

print(cache.get(Key(id=10)))

Everything works as expected.

I guess that you used the version of ignite-core (thin-client) older than 2.14.0.
In that version, compactFooter equals to false, but on server side and pyignite it is by default enabled.

But pyignite has an ability to detect this param after fetching the data. That is the reason why you code started working after fetching few data by a scan query.

чт, 22 дек. 2022 г. в 09:13, Ivan Daschinsky <iv...@gmail.com>>:
Couls you please specify the exact versions of pyignite and ignite-core (java thin client)?

ср, 21 дек. 2022 г., 18:36 Айсина Роза Мунеровна <ro...@sbermarket.ru>>:
Hola again!

I accidently discovered some strange behaviour when trying to get value by key in Python.

I do this in part 3:


cache = ignite_client.get_cache("PUBLIC_ProductFeatures")
key = IoSbmtProductFeaturesKey(product_sku=15052004)
cursor = cache.scan(partitions=1)

# Uncomment to see error
# value = cache.get(key)

true_key, true_value = next(cursor)  # THIS LINE IS CRUCIAL!!!11
print("true_key:  ", true_key)
print("true_value:", true_value)

value = cache.get(key)

So if data from cursor is read first then everything works as expected.
If there is no cursor or reading data from it happens AFTER cache.get(key) - everything fails and key is not found.

Is it ok?
Maybe there is some dynamic binding of classes?
Looks really weird.

Help please!

On 20 Dec 2022, at 1:35 PM, Айсина Роза Мунеровна <ro...@sbermarket.ru>> wrote:

Hola!
I can’t get data by key in Python in caches created in Java with binary objects.

1. Cache was created though DDL in SQL API:

CREATE TABLE IF NOT EXISTS PUBLIC.ProductFeatures
(
     product_sku INT PRIMARY KEY,
     total_cnt_orders_with_sku INT
)
WITH "CACHE_NAME=PUBLIC_ProductFeatures,
     KEY_TYPE=io.sbmt.ProductFeaturesKey,
     VALUE_TYPE=io.sbmt.ProductFeaturesValue,
     AFFINITY_KEY=product_sku,
     TEMPLATE=PARTITIONED,
     BACKUPS=1”

2. Java apps uploads data to this cache through Key-Value API with binary object underneath:

ClientCache<BinaryObject, BinaryObject> igniteCache = igniteClient
     .cache(config.getCacheName())
     .withKeepBinary();

final BinaryObjectBuilder keyBuilder = igniteClient.binary().builder(config.getKeyType());
final BinaryObjectBuilder valueBuilder = igniteClient.binary().builder(config.getValueType());

keyBuilder.setField(column.name<http://column.name/>, id);
valueBuilder.setField(column.name<http://column.name/>, id);

final BinaryObject key = keyBuilder.build();
final BinaryObject value = valueBuilder.build();

igniteCache.put(key, value);


3. In Python client I create Complex Object class and try to get data from this cache:


class IoSbmtProductFeaturesKey(
    metaclass=GenericObjectMeta,
    schema={
        'product_sku': IntObject
    },
    type_name='io.sbmt.ProductFeaturesKey'
):
    pass


ignite_client.register_binary_type(IoSbmtProductFeaturesKey)

key = IoSbmtProductFeaturesKey(product_sku=15052004)
cache = ignite_client.get_cache("PUBLIC_ProductFeatures")
value = cache.get(key)

cursor = cache.scan(partitions=1)  # to check that key really exists
true_key, true_value = next(cursor)

What I see:

>>> true_key
IoSbmtProductFeaturesKey(product_sku=15052004, version=1)
>>> key
IoSbmtProductFeaturesKey(product_sku=15052004, version=1)
>>> true_key == key
True
>>> cache.get(true_key)
IoSbmtProductFeaturesValue(total_cnt_orders_with_sku=12, version=1)
>>> cache.get(true_key) == true_value
True
>>> cache.get(key)
>>> type(cache.get(key))
<class 'NoneType'>

So I can’t create Python analogue of Java binary class that is stored as key in the cache.
I tried also to change case in schema of python class, check all this on cache with composite key, to not specify type_id - nothing helps :(

Please help.

--

Роза Айсина
Старший разработчик ПО
СберМаркет | Доставка из любимых магазинов



Email: roza.aysina@sbermarket.ru<ma...@sbermarket.ru>
Mob:
Web: sbermarket.ru<https://sbermarket.ru/>
App: iOS<https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457> и Android<https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>








УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ: это электронное сообщение и любые документы, приложенные к нему, содержат конфиденциальную информацию. Настоящим уведомляем Вас о том, что, если это сообщение не предназначено Вам, использование, копирование, распространение информации, содержащейся в настоящем сообщении, а также осуществление любых действий на основе этой информации, строго запрещено. Если Вы получили это сообщение по ошибке, пожалуйста, сообщите об этом отправителю по электронной почте и удалите это сообщение.
CONFIDENTIALITY NOTICE: This email and any files attached to it are confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email.

--

Роза Айсина
Старший разработчик ПО
СберМаркет | Доставка из любимых магазинов



Email: roza.aysina@sbermarket.ru<ma...@sbermarket.ru>
Mob:
Web: sbermarket.ru<https://sbermarket.ru/>
App: iOS<https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457> и Android<https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>





--

Роза Айсина
Старший разработчик ПО
СберМаркет | Доставка из любимых магазинов



Email: roza.aysina@sbermarket.ru<ma...@sbermarket.ru>
Mob:
Web: sbermarket.ru<https://sbermarket.ru/>
App: iOS<https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457> и Android<https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>








УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ: это электронное сообщение и любые документы, приложенные к нему, содержат конфиденциальную информацию. Настоящим уведомляем Вас о том, что, если это сообщение не предназначено Вам, использование, копирование, распространение информации, содержащейся в настоящем сообщении, а также осуществление любых действий на основе этой информации, строго запрещено. Если Вы получили это сообщение по ошибке, пожалуйста, сообщите об этом отправителю по электронной почте и удалите это сообщение.
CONFIDENTIALITY NOTICE: This email and any files attached to it are confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email.


--
Sincerely yours, Ivan Daschinskiy


--
Sincerely yours, Ivan Daschinskiy

--

Роза Айсина
Старший разработчик ПО
СберМаркет | Доставка из любимых магазинов



Email: roza.aysina@sbermarket.ru<ma...@sbermarket.ru>
Mob:
Web: sbermarket.ru<https://sbermarket.ru/>
App: iOS<https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457> и Android<https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>








УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ: это электронное сообщение и любые документы, приложенные к нему, содержат конфиденциальную информацию. Настоящим уведомляем Вас о том, что, если это сообщение не предназначено Вам, использование, копирование, распространение информации, содержащейся в настоящем сообщении, а также осуществление любых действий на основе этой информации, строго запрещено. Если Вы получили это сообщение по ошибке, пожалуйста, сообщите об этом отправителю по электронной почте и удалите это сообщение.
CONFIDENTIALITY NOTICE: This email and any files attached to it are confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email.

--

Роза Айсина
Старший разработчик ПО
СберМаркет | Доставка из любимых магазинов



Email: roza.aysina@sbermarket.ru<ma...@sbermarket.ru>
Mob:
Web: sbermarket.ru<https://sbermarket.ru/>
App: iOS<https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457> и Android<https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>






--

Роза Айсина

Старший разработчик ПО

СберМаркет | Доставка из любимых магазинов



Email: roza.aysina@sbermarket.ru<ma...@sbermarket.ru>

Mob:

Web: sbermarket.ru<https://sbermarket.ru/>

App: iOS<https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457> и Android<https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>



УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ: это электронное сообщение и любые документы, приложенные к нему, содержат конфиденциальную информацию. Настоящим уведомляем Вас о том, что, если это сообщение не предназначено Вам, использование, копирование, распространение информации, содержащейся в настоящем сообщении, а также осуществление любых действий на основе этой информации, строго запрещено. Если Вы получили это сообщение по ошибке, пожалуйста, сообщите об этом отправителю по электронной почте и удалите это сообщение.
CONFIDENTIALITY NOTICE: This email and any files attached to it are confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email.

Re: [!!Массовая рассылка]Can't access binary key from Python client

Posted by Айсина Роза Мунеровна <ro...@sbermarket.ru>.
Hi Ivan!

Thank you for your reply!

I tested your snippets with client and server node.
When I raise server node in the snippet - everything works as expected, the same output (key exists).
When I raise cluster manually on localhost and raise client node in the snippet - I have None in output.

I used this dependency:
pyignite = "0.5.2”  in Python
implementation group: 'org.apache.ignite', name: 'ignite-core', version: ‘2.13.0’ in Java

The same version that we have for production cluster.

So how can I fix this? And where - in Python connection or server config?

Thanks!


On 22 Dec 2022, at 10:40 AM, Ivan Daschinsky <iv...@gmail.com> wrote:

Внимание: Внешний отправитель!
Если вы не знаете отправителя - не открывайте вложения, не переходите по ссылкам, не пересылайте письмо!

Firstly, please run the java snippet, then run the python snippet
I got this output:
/home/ivandasch/.virtualenvs/pyignite-py38/bin/python /home/ivandasch/.config/JetBrains/PyCharm2022.2/scratches/scratch.py
ValueType(name='test', version=1)

чт, 22 дек. 2022 г. в 10:40, Ivan Daschinsky <iv...@gmail.com>>:
Just tried on (ignite 2.13.0 server, ignite-client on master, pyignite on 0.6.0)

Java code:

import org.apache.ignite.Ignition;
import org.apache.ignite.binary.BinaryObject;
import org.apache.ignite.client.ClientCache;
import org.apache.ignite.client.IgniteClient;
import org.apache.ignite.configuration.ClientConfiguration;

class Scratch {
    public static void main(String[] args) {
        try (IgniteClient client = Ignition.startClient(new ClientConfiguration()
            .setAddresses("127.0.0.1:10800<http://127.0.0.1:10800/>", "127.0.0.1:10801<http://127.0.0.1:10801/>", "127.0.0.1:10802<http://127.0.0.1:10802/>"))) {

            ClientCache<Object, Object> cache = client.getOrCreateCache("test").withKeepBinary();

            BinaryObject key = client.binary().builder("KeyType").setField("id", 10, Integer.class).build();
            BinaryObject val = client.binary().builder("ValueType").setField("name", "test", String.class).build();

            cache.put(key, val);
        }
    }
}

Python code:

from pyignite import Client
from pyignite import GenericObjectMeta
from pyignite.datatypes import IntObject, String

class Key(
    metaclass=GenericObjectMeta,
    type_name="KeyType",
    schema={
        'id': IntObject,
    },
    version=1,
):
    pass

class Value(
    metaclass=GenericObjectMeta,
    type_name="ValueType",
    schema={
        'name': String,
    },
    version=1,
):
    pass

client = Client()
client.connect([('127.0.0.1', 10800 + i) for i in range(0, 3)])
cache = client.get_or_create_cache("test")

print(cache.get(Key(id=10)))

Everything works as expected.

I guess that you used the version of ignite-core (thin-client) older than 2.14.0.
In that version, compactFooter equals to false, but on server side and pyignite it is by default enabled.

But pyignite has an ability to detect this param after fetching the data. That is the reason why you code started working after fetching few data by a scan query.

чт, 22 дек. 2022 г. в 09:13, Ivan Daschinsky <iv...@gmail.com>>:
Couls you please specify the exact versions of pyignite and ignite-core (java thin client)?

ср, 21 дек. 2022 г., 18:36 Айсина Роза Мунеровна <ro...@sbermarket.ru>>:
Hola again!

I accidently discovered some strange behaviour when trying to get value by key in Python.

I do this in part 3:


cache = ignite_client.get_cache("PUBLIC_ProductFeatures")
key = IoSbmtProductFeaturesKey(product_sku=15052004)
cursor = cache.scan(partitions=1)

# Uncomment to see error
# value = cache.get(key)

true_key, true_value = next(cursor)  # THIS LINE IS CRUCIAL!!!11
print("true_key:  ", true_key)
print("true_value:", true_value)

value = cache.get(key)

So if data from cursor is read first then everything works as expected.
If there is no cursor or reading data from it happens AFTER cache.get(key) - everything fails and key is not found.

Is it ok?
Maybe there is some dynamic binding of classes?
Looks really weird.

Help please!

On 20 Dec 2022, at 1:35 PM, Айсина Роза Мунеровна <ro...@sbermarket.ru>> wrote:

Hola!
I can’t get data by key in Python in caches created in Java with binary objects.

1. Cache was created though DDL in SQL API:

CREATE TABLE IF NOT EXISTS PUBLIC.ProductFeatures
(
     product_sku INT PRIMARY KEY,
     total_cnt_orders_with_sku INT
)
WITH "CACHE_NAME=PUBLIC_ProductFeatures,
     KEY_TYPE=io.sbmt.ProductFeaturesKey,
     VALUE_TYPE=io.sbmt.ProductFeaturesValue,
     AFFINITY_KEY=product_sku,
     TEMPLATE=PARTITIONED,
     BACKUPS=1”

2. Java apps uploads data to this cache through Key-Value API with binary object underneath:

ClientCache<BinaryObject, BinaryObject> igniteCache = igniteClient
     .cache(config.getCacheName())
     .withKeepBinary();

final BinaryObjectBuilder keyBuilder = igniteClient.binary().builder(config.getKeyType());
final BinaryObjectBuilder valueBuilder = igniteClient.binary().builder(config.getValueType());

keyBuilder.setField(column.name<http://column.name/>, id);
valueBuilder.setField(column.name<http://column.name/>, id);

final BinaryObject key = keyBuilder.build();
final BinaryObject value = valueBuilder.build();

igniteCache.put(key, value);


3. In Python client I create Complex Object class and try to get data from this cache:


class IoSbmtProductFeaturesKey(
    metaclass=GenericObjectMeta,
    schema={
        'product_sku': IntObject
    },
    type_name='io.sbmt.ProductFeaturesKey'
):
    pass


ignite_client.register_binary_type(IoSbmtProductFeaturesKey)

key = IoSbmtProductFeaturesKey(product_sku=15052004)
cache = ignite_client.get_cache("PUBLIC_ProductFeatures")
value = cache.get(key)

cursor = cache.scan(partitions=1)  # to check that key really exists
true_key, true_value = next(cursor)

What I see:

>>> true_key
IoSbmtProductFeaturesKey(product_sku=15052004, version=1)
>>> key
IoSbmtProductFeaturesKey(product_sku=15052004, version=1)
>>> true_key == key
True
>>> cache.get(true_key)
IoSbmtProductFeaturesValue(total_cnt_orders_with_sku=12, version=1)
>>> cache.get(true_key) == true_value
True
>>> cache.get(key)
>>> type(cache.get(key))
<class 'NoneType'>

So I can’t create Python analogue of Java binary class that is stored as key in the cache.
I tried also to change case in schema of python class, check all this on cache with composite key, to not specify type_id - nothing helps :(

Please help.

--

Роза Айсина
Старший разработчик ПО
СберМаркет | Доставка из любимых магазинов



Email: roza.aysina@sbermarket.ru<ma...@sbermarket.ru>
Mob:
Web: sbermarket.ru<https://sbermarket.ru/>
App: iOS<https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457> и Android<https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>








УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ: это электронное сообщение и любые документы, приложенные к нему, содержат конфиденциальную информацию. Настоящим уведомляем Вас о том, что, если это сообщение не предназначено Вам, использование, копирование, распространение информации, содержащейся в настоящем сообщении, а также осуществление любых действий на основе этой информации, строго запрещено. Если Вы получили это сообщение по ошибке, пожалуйста, сообщите об этом отправителю по электронной почте и удалите это сообщение.
CONFIDENTIALITY NOTICE: This email and any files attached to it are confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email.

--

Роза Айсина
Старший разработчик ПО
СберМаркет | Доставка из любимых магазинов



Email: roza.aysina@sbermarket.ru<ma...@sbermarket.ru>
Mob:
Web: sbermarket.ru<https://sbermarket.ru/>
App: iOS<https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457> и Android<https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>





--

Роза Айсина
Старший разработчик ПО
СберМаркет | Доставка из любимых магазинов



Email: roza.aysina@sbermarket.ru<ma...@sbermarket.ru>
Mob:
Web: sbermarket.ru<https://sbermarket.ru/>
App: iOS<https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457> и Android<https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>








УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ: это электронное сообщение и любые документы, приложенные к нему, содержат конфиденциальную информацию. Настоящим уведомляем Вас о том, что, если это сообщение не предназначено Вам, использование, копирование, распространение информации, содержащейся в настоящем сообщении, а также осуществление любых действий на основе этой информации, строго запрещено. Если Вы получили это сообщение по ошибке, пожалуйста, сообщите об этом отправителю по электронной почте и удалите это сообщение.
CONFIDENTIALITY NOTICE: This email and any files attached to it are confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email.


--
Sincerely yours, Ivan Daschinskiy


--
Sincerely yours, Ivan Daschinskiy


--

Роза Айсина

Старший разработчик ПО

СберМаркет | Доставка из любимых магазинов



Email: roza.aysina@sbermarket.ru<ma...@sbermarket.ru>

Mob:

Web: sbermarket.ru<https://sbermarket.ru/>

App: iOS<https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457> и Android<https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>



УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ: это электронное сообщение и любые документы, приложенные к нему, содержат конфиденциальную информацию. Настоящим уведомляем Вас о том, что, если это сообщение не предназначено Вам, использование, копирование, распространение информации, содержащейся в настоящем сообщении, а также осуществление любых действий на основе этой информации, строго запрещено. Если Вы получили это сообщение по ошибке, пожалуйста, сообщите об этом отправителю по электронной почте и удалите это сообщение.
CONFIDENTIALITY NOTICE: This email and any files attached to it are confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email.

Re: [!!Массовая рассылка]Can't access binary key from Python client

Posted by Ivan Daschinsky <iv...@gmail.com>.
Firstly, please run the java snippet, then run the python snippet
I got this output:
/home/ivandasch/.virtualenvs/pyignite-py38/bin/python
/home/ivandasch/.config/JetBrains/PyCharm2022.2/scratches/scratch.py
ValueType(name='test', version=1)

чт, 22 дек. 2022 г. в 10:40, Ivan Daschinsky <iv...@gmail.com>:

> Just tried on (ignite 2.13.0 server, ignite-client on master, pyignite on
> 0.6.0)
>
> Java code:
>
> import org.apache.ignite.Ignition;
> import org.apache.ignite.binary.BinaryObject;
> import org.apache.ignite.client.ClientCache;
> import org.apache.ignite.client.IgniteClient;
> import org.apache.ignite.configuration.ClientConfiguration;
>
> class Scratch {
>     public static void main(String[] args) {
>         try (IgniteClient client = Ignition.startClient(new
> ClientConfiguration()
>             .setAddresses("127.0.0.1:10800", "127.0.0.1:10801", "
> 127.0.0.1:10802"))) {
>
>             ClientCache<Object, Object> cache =
> client.getOrCreateCache("test").withKeepBinary();
>
>             BinaryObject key =
> client.binary().builder("KeyType").setField("id", 10,
> Integer.class).build();
>             BinaryObject val =
> client.binary().builder("ValueType").setField("name", "test",
> String.class).build();
>
>             cache.put(key, val);
>         }
>     }
> }
>
> Python code:
>
> from pyignite import Client
> from pyignite import GenericObjectMeta
> from pyignite.datatypes import IntObject, String
>
> class Key(
>     metaclass=GenericObjectMeta,
>     type_name="KeyType",
>     schema={
>         'id': IntObject,
>     },
>     version=1,
> ):
>     pass
>
> class Value(
>     metaclass=GenericObjectMeta,
>     type_name="ValueType",
>     schema={
>         'name': String,
>     },
>     version=1,
> ):
>     pass
>
> client = Client()
> client.connect([('127.0.0.1', 10800 + i) for i in range(0, 3)])
> cache = client.get_or_create_cache("test")
>
> print(cache.get(Key(id=10)))
>
> Everything works as expected.
>
> I guess that you used the version of ignite-core (thin-client) older than
> 2.14.0.
> In that version, compactFooter equals to false, but on server side and
> pyignite it is by default enabled.
>
> But pyignite has an ability to detect this param after fetching the data.
> That is the reason why you code started working after fetching few data by
> a scan query.
>
> чт, 22 дек. 2022 г. в 09:13, Ivan Daschinsky <iv...@gmail.com>:
>
>> Couls you please specify the exact versions of pyignite and ignite-core
>> (java thin client)?
>>
>> ср, 21 дек. 2022 г., 18:36 Айсина Роза Мунеровна <
>> roza.aysina@sbermarket.ru>:
>>
>>> Hola again!
>>>
>>> I accidently discovered some strange behaviour when trying to get value
>>> by key in Python.
>>>
>>> I do this in part 3:
>>>
>>> cache = ignite_client.get_cache("PUBLIC_ProductFeatures")
>>> key = IoSbmtProductFeaturesKey(product_sku=15052004)
>>> cursor = cache.scan(partitions=1)
>>>
>>> # Uncomment to see error
>>> # value = cache.get(key)
>>>
>>> true_key, true_value = next(cursor)  # THIS LINE IS CRUCIAL!!!11
>>> print("true_key:  ", true_key)
>>> print("true_value:", true_value)
>>>
>>> value = cache.get(key)
>>>
>>>
>>> So if data from cursor is read first then everything works as expected.
>>> If there is no cursor or reading data from it happens AFTER
>>> cache.get(key) - everything fails and key is not found.
>>>
>>> Is it ok?
>>> Maybe there is some dynamic binding of classes?
>>> Looks really weird.
>>>
>>> Help please!
>>>
>>> On 20 Dec 2022, at 1:35 PM, Айсина Роза Мунеровна <
>>> roza.aysina@sbermarket.ru> wrote:
>>>
>>> Hola!
>>> I can’t get data by key in Python in caches created in Java with binary
>>> objects.
>>>
>>> 1. Cache was created though DDL in SQL API:
>>>
>>> CREATE TABLE IF NOT EXISTS PUBLIC.ProductFeatures
>>> (
>>>      product_sku INT PRIMARY KEY,
>>>      total_cnt_orders_with_sku INT
>>> )
>>> WITH "CACHE_NAME=PUBLIC_ProductFeatures,
>>>      KEY_TYPE=io.sbmt.ProductFeaturesKey,
>>>      VALUE_TYPE=io.sbmt.ProductFeaturesValue,
>>>      AFFINITY_KEY=product_sku,
>>>      TEMPLATE=PARTITIONED,
>>>      BACKUPS=1”
>>>
>>> 2. Java apps uploads data to this cache through Key-Value API with
>>> binary object underneath:
>>>
>>> ClientCache<BinaryObject, BinaryObject> igniteCache = igniteClient
>>>      .cache(config.getCacheName())
>>>      .withKeepBinary();
>>>
>>> final BinaryObjectBuilder keyBuilder =
>>> igniteClient.binary().builder(config.getKeyType());
>>> final BinaryObjectBuilder valueBuilder =
>>> igniteClient.binary().builder(config.getValueType());
>>>
>>> keyBuilder.setField(column.name, id);
>>> valueBuilder.setField(column.name, id);
>>>
>>> final BinaryObject key = keyBuilder.build();
>>> final BinaryObject value = valueBuilder.build();
>>>
>>> igniteCache.put(key, value);
>>>
>>>
>>> 3. In Python client I create Complex Object class and try to get data
>>> from this cache:
>>>
>>> class IoSbmtProductFeaturesKey(
>>>     metaclass=GenericObjectMeta,
>>>     schema={
>>>         'product_sku': IntObject
>>>     },
>>>     type_name='io.sbmt.ProductFeaturesKey'
>>> ):
>>>     pass
>>>
>>>
>>> ignite_client.register_binary_type(IoSbmtProductFeaturesKey)
>>>
>>> key = IoSbmtProductFeaturesKey(product_sku=15052004)
>>> cache = ignite_client.get_cache("PUBLIC_ProductFeatures")
>>> value = cache.get(key)
>>>
>>> cursor = cache.scan(partitions=1)  # to check that key really exists
>>> true_key, true_value = next(cursor)
>>>
>>>
>>> What I see:
>>>
>>> >>> *true_key*
>>> IoSbmtProductFeaturesKey(product_sku=15052004, version=1)
>>> >>> *key*
>>> IoSbmtProductFeaturesKey(product_sku=15052004, version=1)
>>> >>> *true_key == key*
>>> True
>>> >>> *cache.get(true_key)*
>>> IoSbmtProductFeaturesValue(total_cnt_orders_with_sku=12, version=1)
>>> >>> *cache.get(true_key) == true_value*
>>> True
>>> >>> *cache.get(key)*
>>> >>> *type(cache.get(key))*
>>> <class 'NoneType'>
>>>
>>> So I can’t create Python analogue of Java binary class that is stored as
>>> key in the cache.
>>> I tried also to change case in schema of python class, check all this on
>>> cache with composite key, to not specify *type_id* - nothing helps :(
>>>
>>> Please help.
>>>
>>> *--*
>>>
>>> *Роза Айсина*
>>> Старший разработчик ПО
>>> *СберМаркет* | Доставка из любимых магазинов
>>>
>>>
>>> Email: roza.aysina@sbermarket.ru
>>> Mob:
>>> Web: sbermarket.ru
>>> App: iOS
>>> <https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457>
>>> и Android
>>> <https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ:* это электронное сообщение и любые
>>> документы, приложенные к нему, содержат конфиденциальную информацию.
>>> Настоящим уведомляем Вас о том, что, если это сообщение не предназначено
>>> Вам, использование, копирование, распространение информации, содержащейся в
>>> настоящем сообщении, а также осуществление любых действий на основе этой
>>> информации, строго запрещено. Если Вы получили это сообщение по ошибке,
>>> пожалуйста, сообщите об этом отправителю по электронной почте и удалите это
>>> сообщение.
>>> *CONFIDENTIALITY NOTICE:* This email and any files attached to it are
>>> confidential. If you are not the intended recipient you are notified that
>>> using, copying, distributing or taking any action in reliance on the
>>> contents of this information is strictly prohibited. If you have received
>>> this email in error please notify the sender and delete this email.
>>> *--*
>>>
>>> *Роза Айсина*
>>> Старший разработчик ПО
>>> *СберМаркет* | Доставка из любимых магазинов
>>>
>>>
>>> Email: roza.aysina@sbermarket.ru
>>> Mob:
>>> Web: sbermarket.ru
>>> App: iOS
>>> <https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457>
>>> и Android
>>> <https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>
>>>
>>>
>>>
>>>
>>>
>>> *--*
>>>
>>> *Роза Айсина*
>>>
>>> Старший разработчик ПО
>>>
>>> *СберМаркет* | Доставка из любимых магазинов
>>>
>>>
>>>
>>> Email: roza.aysina@sbermarket.ru
>>>
>>> Mob:
>>>
>>> Web: sbermarket.ru
>>>
>>> App: iOS
>>> <https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457>
>>> и Android
>>> <https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>
>>>
>>>
>>>
>>> *УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ:* это электронное сообщение и любые
>>> документы, приложенные к нему, содержат конфиденциальную информацию.
>>> Настоящим уведомляем Вас о том, что, если это сообщение не предназначено
>>> Вам, использование, копирование, распространение информации, содержащейся в
>>> настоящем сообщении, а также осуществление любых действий на основе этой
>>> информации, строго запрещено. Если Вы получили это сообщение по ошибке,
>>> пожалуйста, сообщите об этом отправителю по электронной почте и удалите это
>>> сообщение.
>>> *CONFIDENTIALITY NOTICE:* This email and any files attached to it are
>>> confidential. If you are not the intended recipient you are notified that
>>> using, copying, distributing or taking any action in reliance on the
>>> contents of this information is strictly prohibited. If you have received
>>> this email in error please notify the sender and delete this email.
>>>
>>
>
> --
> Sincerely yours, Ivan Daschinskiy
>


-- 
Sincerely yours, Ivan Daschinskiy

Re: [!!Массовая рассылка]Can't access binary key from Python client

Posted by Ivan Daschinsky <iv...@gmail.com>.
Just tried on (ignite 2.13.0 server, ignite-client on master, pyignite on
0.6.0)

Java code:

import org.apache.ignite.Ignition;
import org.apache.ignite.binary.BinaryObject;
import org.apache.ignite.client.ClientCache;
import org.apache.ignite.client.IgniteClient;
import org.apache.ignite.configuration.ClientConfiguration;

class Scratch {
    public static void main(String[] args) {
        try (IgniteClient client = Ignition.startClient(new
ClientConfiguration()
            .setAddresses("127.0.0.1:10800", "127.0.0.1:10801", "
127.0.0.1:10802"))) {

            ClientCache<Object, Object> cache =
client.getOrCreateCache("test").withKeepBinary();

            BinaryObject key =
client.binary().builder("KeyType").setField("id", 10,
Integer.class).build();
            BinaryObject val =
client.binary().builder("ValueType").setField("name", "test",
String.class).build();

            cache.put(key, val);
        }
    }
}

Python code:

from pyignite import Client
from pyignite import GenericObjectMeta
from pyignite.datatypes import IntObject, String

class Key(
    metaclass=GenericObjectMeta,
    type_name="KeyType",
    schema={
        'id': IntObject,
    },
    version=1,
):
    pass

class Value(
    metaclass=GenericObjectMeta,
    type_name="ValueType",
    schema={
        'name': String,
    },
    version=1,
):
    pass

client = Client()
client.connect([('127.0.0.1', 10800 + i) for i in range(0, 3)])
cache = client.get_or_create_cache("test")

print(cache.get(Key(id=10)))

Everything works as expected.

I guess that you used the version of ignite-core (thin-client) older than
2.14.0.
In that version, compactFooter equals to false, but on server side and
pyignite it is by default enabled.

But pyignite has an ability to detect this param after fetching the data.
That is the reason why you code started working after fetching few data by
a scan query.

чт, 22 дек. 2022 г. в 09:13, Ivan Daschinsky <iv...@gmail.com>:

> Couls you please specify the exact versions of pyignite and ignite-core
> (java thin client)?
>
> ср, 21 дек. 2022 г., 18:36 Айсина Роза Мунеровна <
> roza.aysina@sbermarket.ru>:
>
>> Hola again!
>>
>> I accidently discovered some strange behaviour when trying to get value
>> by key in Python.
>>
>> I do this in part 3:
>>
>> cache = ignite_client.get_cache("PUBLIC_ProductFeatures")
>> key = IoSbmtProductFeaturesKey(product_sku=15052004)
>> cursor = cache.scan(partitions=1)
>>
>> # Uncomment to see error
>> # value = cache.get(key)
>>
>> true_key, true_value = next(cursor)  # THIS LINE IS CRUCIAL!!!11
>> print("true_key:  ", true_key)
>> print("true_value:", true_value)
>>
>> value = cache.get(key)
>>
>>
>> So if data from cursor is read first then everything works as expected.
>> If there is no cursor or reading data from it happens AFTER
>> cache.get(key) - everything fails and key is not found.
>>
>> Is it ok?
>> Maybe there is some dynamic binding of classes?
>> Looks really weird.
>>
>> Help please!
>>
>> On 20 Dec 2022, at 1:35 PM, Айсина Роза Мунеровна <
>> roza.aysina@sbermarket.ru> wrote:
>>
>> Hola!
>> I can’t get data by key in Python in caches created in Java with binary
>> objects.
>>
>> 1. Cache was created though DDL in SQL API:
>>
>> CREATE TABLE IF NOT EXISTS PUBLIC.ProductFeatures
>> (
>>      product_sku INT PRIMARY KEY,
>>      total_cnt_orders_with_sku INT
>> )
>> WITH "CACHE_NAME=PUBLIC_ProductFeatures,
>>      KEY_TYPE=io.sbmt.ProductFeaturesKey,
>>      VALUE_TYPE=io.sbmt.ProductFeaturesValue,
>>      AFFINITY_KEY=product_sku,
>>      TEMPLATE=PARTITIONED,
>>      BACKUPS=1”
>>
>> 2. Java apps uploads data to this cache through Key-Value API with binary
>> object underneath:
>>
>> ClientCache<BinaryObject, BinaryObject> igniteCache = igniteClient
>>      .cache(config.getCacheName())
>>      .withKeepBinary();
>>
>> final BinaryObjectBuilder keyBuilder =
>> igniteClient.binary().builder(config.getKeyType());
>> final BinaryObjectBuilder valueBuilder =
>> igniteClient.binary().builder(config.getValueType());
>>
>> keyBuilder.setField(column.name, id);
>> valueBuilder.setField(column.name, id);
>>
>> final BinaryObject key = keyBuilder.build();
>> final BinaryObject value = valueBuilder.build();
>>
>> igniteCache.put(key, value);
>>
>>
>> 3. In Python client I create Complex Object class and try to get data
>> from this cache:
>>
>> class IoSbmtProductFeaturesKey(
>>     metaclass=GenericObjectMeta,
>>     schema={
>>         'product_sku': IntObject
>>     },
>>     type_name='io.sbmt.ProductFeaturesKey'
>> ):
>>     pass
>>
>>
>> ignite_client.register_binary_type(IoSbmtProductFeaturesKey)
>>
>> key = IoSbmtProductFeaturesKey(product_sku=15052004)
>> cache = ignite_client.get_cache("PUBLIC_ProductFeatures")
>> value = cache.get(key)
>>
>> cursor = cache.scan(partitions=1)  # to check that key really exists
>> true_key, true_value = next(cursor)
>>
>>
>> What I see:
>>
>> >>> *true_key*
>> IoSbmtProductFeaturesKey(product_sku=15052004, version=1)
>> >>> *key*
>> IoSbmtProductFeaturesKey(product_sku=15052004, version=1)
>> >>> *true_key == key*
>> True
>> >>> *cache.get(true_key)*
>> IoSbmtProductFeaturesValue(total_cnt_orders_with_sku=12, version=1)
>> >>> *cache.get(true_key) == true_value*
>> True
>> >>> *cache.get(key)*
>> >>> *type(cache.get(key))*
>> <class 'NoneType'>
>>
>> So I can’t create Python analogue of Java binary class that is stored as
>> key in the cache.
>> I tried also to change case in schema of python class, check all this on
>> cache with composite key, to not specify *type_id* - nothing helps :(
>>
>> Please help.
>>
>> *--*
>>
>> *Роза Айсина*
>> Старший разработчик ПО
>> *СберМаркет* | Доставка из любимых магазинов
>>
>>
>> Email: roza.aysina@sbermarket.ru
>> Mob:
>> Web: sbermarket.ru
>> App: iOS
>> <https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457>
>> и Android
>> <https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>
>>
>>
>>
>>
>>
>>
>>
>> *УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ:* это электронное сообщение и любые
>> документы, приложенные к нему, содержат конфиденциальную информацию.
>> Настоящим уведомляем Вас о том, что, если это сообщение не предназначено
>> Вам, использование, копирование, распространение информации, содержащейся в
>> настоящем сообщении, а также осуществление любых действий на основе этой
>> информации, строго запрещено. Если Вы получили это сообщение по ошибке,
>> пожалуйста, сообщите об этом отправителю по электронной почте и удалите это
>> сообщение.
>> *CONFIDENTIALITY NOTICE:* This email and any files attached to it are
>> confidential. If you are not the intended recipient you are notified that
>> using, copying, distributing or taking any action in reliance on the
>> contents of this information is strictly prohibited. If you have received
>> this email in error please notify the sender and delete this email.
>> *--*
>>
>> *Роза Айсина*
>> Старший разработчик ПО
>> *СберМаркет* | Доставка из любимых магазинов
>>
>>
>> Email: roza.aysina@sbermarket.ru
>> Mob:
>> Web: sbermarket.ru
>> App: iOS
>> <https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457>
>> и Android
>> <https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>
>>
>>
>>
>>
>>
>> *--*
>>
>> *Роза Айсина*
>>
>> Старший разработчик ПО
>>
>> *СберМаркет* | Доставка из любимых магазинов
>>
>>
>>
>> Email: roza.aysina@sbermarket.ru
>>
>> Mob:
>>
>> Web: sbermarket.ru
>>
>> App: iOS
>> <https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457>
>> и Android
>> <https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>
>>
>>
>>
>> *УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ:* это электронное сообщение и любые
>> документы, приложенные к нему, содержат конфиденциальную информацию.
>> Настоящим уведомляем Вас о том, что, если это сообщение не предназначено
>> Вам, использование, копирование, распространение информации, содержащейся в
>> настоящем сообщении, а также осуществление любых действий на основе этой
>> информации, строго запрещено. Если Вы получили это сообщение по ошибке,
>> пожалуйста, сообщите об этом отправителю по электронной почте и удалите это
>> сообщение.
>> *CONFIDENTIALITY NOTICE:* This email and any files attached to it are
>> confidential. If you are not the intended recipient you are notified that
>> using, copying, distributing or taking any action in reliance on the
>> contents of this information is strictly prohibited. If you have received
>> this email in error please notify the sender and delete this email.
>>
>

-- 
Sincerely yours, Ivan Daschinskiy

Re: [!!Массовая рассылка]Can't access binary key from Python client

Posted by Ivan Daschinsky <iv...@gmail.com>.
Couls you please specify the exact versions of pyignite and ignite-core
(java thin client)?

ср, 21 дек. 2022 г., 18:36 Айсина Роза Мунеровна <roza.aysina@sbermarket.ru
>:

> Hola again!
>
> I accidently discovered some strange behaviour when trying to get value by
> key in Python.
>
> I do this in part 3:
>
> cache = ignite_client.get_cache("PUBLIC_ProductFeatures")
> key = IoSbmtProductFeaturesKey(product_sku=15052004)
> cursor = cache.scan(partitions=1)
>
> # Uncomment to see error
> # value = cache.get(key)
>
> true_key, true_value = next(cursor)  # THIS LINE IS CRUCIAL!!!11
> print("true_key:  ", true_key)
> print("true_value:", true_value)
>
> value = cache.get(key)
>
>
> So if data from cursor is read first then everything works as expected.
> If there is no cursor or reading data from it happens AFTER cache.get(key)
> - everything fails and key is not found.
>
> Is it ok?
> Maybe there is some dynamic binding of classes?
> Looks really weird.
>
> Help please!
>
> On 20 Dec 2022, at 1:35 PM, Айсина Роза Мунеровна <
> roza.aysina@sbermarket.ru> wrote:
>
> Hola!
> I can’t get data by key in Python in caches created in Java with binary
> objects.
>
> 1. Cache was created though DDL in SQL API:
>
> CREATE TABLE IF NOT EXISTS PUBLIC.ProductFeatures
> (
>      product_sku INT PRIMARY KEY,
>      total_cnt_orders_with_sku INT
> )
> WITH "CACHE_NAME=PUBLIC_ProductFeatures,
>      KEY_TYPE=io.sbmt.ProductFeaturesKey,
>      VALUE_TYPE=io.sbmt.ProductFeaturesValue,
>      AFFINITY_KEY=product_sku,
>      TEMPLATE=PARTITIONED,
>      BACKUPS=1”
>
> 2. Java apps uploads data to this cache through Key-Value API with binary
> object underneath:
>
> ClientCache<BinaryObject, BinaryObject> igniteCache = igniteClient
>      .cache(config.getCacheName())
>      .withKeepBinary();
>
> final BinaryObjectBuilder keyBuilder =
> igniteClient.binary().builder(config.getKeyType());
> final BinaryObjectBuilder valueBuilder =
> igniteClient.binary().builder(config.getValueType());
>
> keyBuilder.setField(column.name, id);
> valueBuilder.setField(column.name, id);
>
> final BinaryObject key = keyBuilder.build();
> final BinaryObject value = valueBuilder.build();
>
> igniteCache.put(key, value);
>
>
> 3. In Python client I create Complex Object class and try to get data from
> this cache:
>
> class IoSbmtProductFeaturesKey(
>     metaclass=GenericObjectMeta,
>     schema={
>         'product_sku': IntObject
>     },
>     type_name='io.sbmt.ProductFeaturesKey'
> ):
>     pass
>
>
> ignite_client.register_binary_type(IoSbmtProductFeaturesKey)
>
> key = IoSbmtProductFeaturesKey(product_sku=15052004)
> cache = ignite_client.get_cache("PUBLIC_ProductFeatures")
> value = cache.get(key)
>
> cursor = cache.scan(partitions=1)  # to check that key really exists
> true_key, true_value = next(cursor)
>
>
> What I see:
>
> >>> *true_key*
> IoSbmtProductFeaturesKey(product_sku=15052004, version=1)
> >>> *key*
> IoSbmtProductFeaturesKey(product_sku=15052004, version=1)
> >>> *true_key == key*
> True
> >>> *cache.get(true_key)*
> IoSbmtProductFeaturesValue(total_cnt_orders_with_sku=12, version=1)
> >>> *cache.get(true_key) == true_value*
> True
> >>> *cache.get(key)*
> >>> *type(cache.get(key))*
> <class 'NoneType'>
>
> So I can’t create Python analogue of Java binary class that is stored as
> key in the cache.
> I tried also to change case in schema of python class, check all this on
> cache with composite key, to not specify *type_id* - nothing helps :(
>
> Please help.
>
> *--*
>
> *Роза Айсина*
> Старший разработчик ПО
> *СберМаркет* | Доставка из любимых магазинов
>
>
> Email: roza.aysina@sbermarket.ru
> Mob:
> Web: sbermarket.ru
> App: iOS
> <https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457>
> и Android
> <https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>
>
>
>
>
>
>
>
> *УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ:* это электронное сообщение и любые
> документы, приложенные к нему, содержат конфиденциальную информацию.
> Настоящим уведомляем Вас о том, что, если это сообщение не предназначено
> Вам, использование, копирование, распространение информации, содержащейся в
> настоящем сообщении, а также осуществление любых действий на основе этой
> информации, строго запрещено. Если Вы получили это сообщение по ошибке,
> пожалуйста, сообщите об этом отправителю по электронной почте и удалите это
> сообщение.
> *CONFIDENTIALITY NOTICE:* This email and any files attached to it are
> confidential. If you are not the intended recipient you are notified that
> using, copying, distributing or taking any action in reliance on the
> contents of this information is strictly prohibited. If you have received
> this email in error please notify the sender and delete this email.
> *--*
>
> *Роза Айсина*
> Старший разработчик ПО
> *СберМаркет* | Доставка из любимых магазинов
>
>
> Email: roza.aysina@sbermarket.ru
> Mob:
> Web: sbermarket.ru
> App: iOS
> <https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457>
> и Android
> <https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>
>
>
>
>
>
> *--*
>
> *Роза Айсина*
>
> Старший разработчик ПО
>
> *СберМаркет* | Доставка из любимых магазинов
>
>
>
> Email: roza.aysina@sbermarket.ru
>
> Mob:
>
> Web: sbermarket.ru
>
> App: iOS
> <https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457>
> и Android
> <https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>
>
>
>
> *УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ:* это электронное сообщение и любые
> документы, приложенные к нему, содержат конфиденциальную информацию.
> Настоящим уведомляем Вас о том, что, если это сообщение не предназначено
> Вам, использование, копирование, распространение информации, содержащейся в
> настоящем сообщении, а также осуществление любых действий на основе этой
> информации, строго запрещено. Если Вы получили это сообщение по ошибке,
> пожалуйста, сообщите об этом отправителю по электронной почте и удалите это
> сообщение.
> *CONFIDENTIALITY NOTICE:* This email and any files attached to it are
> confidential. If you are not the intended recipient you are notified that
> using, copying, distributing or taking any action in reliance on the
> contents of this information is strictly prohibited. If you have received
> this email in error please notify the sender and delete this email.
>

Re: [!!Массовая рассылка]Can't access binary key from Python client

Posted by Айсина Роза Мунеровна <ro...@sbermarket.ru>.
Hola again!

I accidently discovered some strange behaviour when trying to get value by key in Python.

I do this in part 3:


cache = ignite_client.get_cache("PUBLIC_ProductFeatures")
key = IoSbmtProductFeaturesKey(product_sku=15052004)
cursor = cache.scan(partitions=1)

# Uncomment to see error
# value = cache.get(key)

true_key, true_value = next(cursor)  # THIS LINE IS CRUCIAL!!!11
print("true_key:  ", true_key)
print("true_value:", true_value)

value = cache.get(key)

So if data from cursor is read first then everything works as expected.
If there is no cursor or reading data from it happens AFTER cache.get(key) - everything fails and key is not found.

Is it ok?
Maybe there is some dynamic binding of classes?
Looks really weird.

Help please!

On 20 Dec 2022, at 1:35 PM, Айсина Роза Мунеровна <ro...@sbermarket.ru> wrote:

Hola!
I can’t get data by key in Python in caches created in Java with binary objects.

1. Cache was created though DDL in SQL API:

CREATE TABLE IF NOT EXISTS PUBLIC.ProductFeatures
(
     product_sku INT PRIMARY KEY,
     total_cnt_orders_with_sku INT
)
WITH "CACHE_NAME=PUBLIC_ProductFeatures,
     KEY_TYPE=io.sbmt.ProductFeaturesKey,
     VALUE_TYPE=io.sbmt.ProductFeaturesValue,
     AFFINITY_KEY=product_sku,
     TEMPLATE=PARTITIONED,
     BACKUPS=1”

2. Java apps uploads data to this cache through Key-Value API with binary object underneath:

ClientCache<BinaryObject, BinaryObject> igniteCache = igniteClient
     .cache(config.getCacheName())
     .withKeepBinary();

final BinaryObjectBuilder keyBuilder = igniteClient.binary().builder(config.getKeyType());
final BinaryObjectBuilder valueBuilder = igniteClient.binary().builder(config.getValueType());

keyBuilder.setField(column.name, id);
valueBuilder.setField(column.name, id);

final BinaryObject key = keyBuilder.build();
final BinaryObject value = valueBuilder.build();

igniteCache.put(key, value);


3. In Python client I create Complex Object class and try to get data from this cache:


class IoSbmtProductFeaturesKey(
    metaclass=GenericObjectMeta,
    schema={
        'product_sku': IntObject
    },
    type_name='io.sbmt.ProductFeaturesKey'
):
    pass


ignite_client.register_binary_type(IoSbmtProductFeaturesKey)

key = IoSbmtProductFeaturesKey(product_sku=15052004)
cache = ignite_client.get_cache("PUBLIC_ProductFeatures")
value = cache.get(key)

cursor = cache.scan(partitions=1)  # to check that key really exists
true_key, true_value = next(cursor)

What I see:

>>> true_key
IoSbmtProductFeaturesKey(product_sku=15052004, version=1)
>>> key
IoSbmtProductFeaturesKey(product_sku=15052004, version=1)
>>> true_key == key
True
>>> cache.get(true_key)
IoSbmtProductFeaturesValue(total_cnt_orders_with_sku=12, version=1)
>>> cache.get(true_key) == true_value
True
>>> cache.get(key)
>>> type(cache.get(key))
<class 'NoneType'>

So I can’t create Python analogue of Java binary class that is stored as key in the cache.
I tried also to change case in schema of python class, check all this on cache with composite key, to not specify type_id - nothing helps :(

Please help.

--

Роза Айсина
Старший разработчик ПО
СберМаркет | Доставка из любимых магазинов



Email: roza.aysina@sbermarket.ru<ma...@sbermarket.ru>
Mob:
Web: sbermarket.ru<https://sbermarket.ru/>
App: iOS<https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457> и Android<https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>








УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ: это электронное сообщение и любые документы, приложенные к нему, содержат конфиденциальную информацию. Настоящим уведомляем Вас о том, что, если это сообщение не предназначено Вам, использование, копирование, распространение информации, содержащейся в настоящем сообщении, а также осуществление любых действий на основе этой информации, строго запрещено. Если Вы получили это сообщение по ошибке, пожалуйста, сообщите об этом отправителю по электронной почте и удалите это сообщение.
CONFIDENTIALITY NOTICE: This email and any files attached to it are confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email.

--

Роза Айсина
Старший разработчик ПО
СберМаркет | Доставка из любимых магазинов



Email: roza.aysina@sbermarket.ru<ma...@sbermarket.ru>
Mob:
Web: sbermarket.ru<https://sbermarket.ru/>
App: iOS<https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457> и Android<https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>






--

Роза Айсина

Старший разработчик ПО

СберМаркет | Доставка из любимых магазинов



Email: roza.aysina@sbermarket.ru<ma...@sbermarket.ru>

Mob:

Web: sbermarket.ru<https://sbermarket.ru/>

App: iOS<https://apps.apple.com/ru/app/%D1%81%D0%B1%D0%B5%D1%80%D0%BC%D0%B0%D1%80%D0%BA%D0%B5%D1%82-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0-%D0%BF%D1%80%D0%BE%D0%B4%D1%83%D0%BA%D1%82%D0%BE%D0%B2/id1166642457> и Android<https://play.google.com/store/apps/details?id=ru.instamart&hl=en&gl=ru>



УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ: это электронное сообщение и любые документы, приложенные к нему, содержат конфиденциальную информацию. Настоящим уведомляем Вас о том, что, если это сообщение не предназначено Вам, использование, копирование, распространение информации, содержащейся в настоящем сообщении, а также осуществление любых действий на основе этой информации, строго запрещено. Если Вы получили это сообщение по ошибке, пожалуйста, сообщите об этом отправителю по электронной почте и удалите это сообщение.
CONFIDENTIALITY NOTICE: This email and any files attached to it are confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email.