ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor Sapego (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IGNITE-10691) Python thin client UUID marshalling is wrong
Date Thu, 21 Mar 2019 16:14:00 GMT

     [ https://issues.apache.org/jira/browse/IGNITE-10691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Igor Sapego updated IGNITE-10691:
---------------------------------
    Description: 
Trying to put uuid with Python client and get from Java or C++ client  have different results

Python put
{code}
cache = client.get_or_create_cache("UUID_PY")
cache.put(1, UUID("d597be47-949e-475b-8918-44ca836798a3"), key_hint=IntObject, value_hint=UUIDObject)
{code}

Java get
{code}
ClientCache<Integer, UUID> cache = igniteClient.getOrCreateCache("UUID_PY");
UUID id = cache.get(1);
System.out.println(id);
{code}

Java output
{code}
5b479e94-47be-97d5-a398-6783ca441889
{code}
Same for C++ thin client

And they looks like mixed up in a different order
Python: {code}d597be47-949e-475b-8918-44ca836798a3{code}
Java: {code}5b479e94-47be-97d5-a398-6783ca441889{code}
For example take "ca" in 7-8 number from the end of java uuid
On left we have "83", but in python "83" stay on right side from "ca"
Different for "44" which is on right for Java but on left for Python

  was:
Trying to put uuid with PY or PHP or NodeJS client and get from Java or C++ client  have different
results

Python put
{code}
cache = client.get_or_create_cache("UUID_PY")
cache.put(1, UUID("d597be47-949e-475b-8918-44ca836798a3"), key_hint=IntObject, value_hint=UUIDObject)
{code}

Java get
{code}
ClientCache<Integer, UUID> cache = igniteClient.getOrCreateCache("UUID_PY");
UUID id = cache.get(1);
System.out.println(id);
{code}

Java output
{code}
5b479e94-47be-97d5-a398-6783ca441889
{code}
Same for C++ thin client

And they looks like mixed up in a different order
Python: {code}d597be47-949e-475b-8918-44ca836798a3{code}
Java: {code}5b479e94-47be-97d5-a398-6783ca441889{code}
For example take "ca" in 7-8 number from the end of java uuid
On left we have "83", but in python "83" stay on right side from "ca"
Different for "44" which is on right for Java but on left for Python

NodeJS put
5fbeee4e-b2a6-44dc-99ac-6444d7fe7df6
{code}
cache = (await igniteClient.getOrCreateCache("UUID_JS"))
    .setKeyType(ObjectType.PRIMITIVE_TYPE.INTEGER)
    .setValueType(ObjectType.PRIMITIVE_TYPE.UUID);
key = 1;
value = [95,190,238,78,178,166,68,220,153,172,100,68,215,254,125,246];
await cache.put(key, value);
{code}

Py get
{code}
cache = client.get_or_create_cache("UUID_JS")
result = cache.get(1, key_hint=IntObject)
print(result)
{code}
Py output
{code}
5fbeee4e-b2a6-44dc-99ac-6444d7fe7df6
{code}


Java get
{code}
ClientCache<Integer, UUID> cache = igniteClient.getOrCreateCache("UUID_JS");
UUID id = cache.get(1);
System.out.println(id);
{code}
Java output
{code}
dc44a6b2-4eee-be5f-f67d-fed74464ac99
{code}

PHP put
[238,15,47,237,224,122,66,220,170,89,127,143,199,56,10,205] = "ee0f2fed-e07a-42dc-aa59-7f8fc7380acd"
{code}
$cache = $client->getOrCreateCache("UUID_PH")->setKeyType(ObjectType::INTEGER)->setValueType(ObjectType::UUID);
$cache->put(1,[238,15,47,237,224,122,66,220,170,89,127,143,199,56,10,205]);
{code}

JS get
{code}
cache = (await igniteClient.getOrCreateCache("UUID_PH"))
                .setKeyType(ObjectType.PRIMITIVE_TYPE.INTEGER)
                .setValueType(ObjectType.PRIMITIVE_TYPE.UUID);
result = (await cache.get(1));
{code}
JS output
{code}
238 15 47 237 224 122 66 220 170 89 127 143 199 56 10 205
{code}

Java get
{code}
ClientCache<Integer, UUID> cache = igniteClient.getOrCreateCache("UUID_PH");
UUID id = cache.get(1);
System.out.println(id);
{code}
Java output
{code}
dc427ae0-ed2f-0fee-cd0a-38c78f7f59aa
{code}


> Python thin client UUID marshalling is wrong
> --------------------------------------------
>
>                 Key: IGNITE-10691
>                 URL: https://issues.apache.org/jira/browse/IGNITE-10691
>             Project: Ignite
>          Issue Type: Bug
>          Components: thin client
>    Affects Versions: 2.7
>            Reporter: Stepan Pilschikov
>            Assignee: Alexey Kosenchuk
>            Priority: Major
>             Fix For: 2.8
>
>
> Trying to put uuid with Python client and get from Java or C++ client  have different
results
> Python put
> {code}
> cache = client.get_or_create_cache("UUID_PY")
> cache.put(1, UUID("d597be47-949e-475b-8918-44ca836798a3"), key_hint=IntObject, value_hint=UUIDObject)
> {code}
> Java get
> {code}
> ClientCache<Integer, UUID> cache = igniteClient.getOrCreateCache("UUID_PY");
> UUID id = cache.get(1);
> System.out.println(id);
> {code}
> Java output
> {code}
> 5b479e94-47be-97d5-a398-6783ca441889
> {code}
> Same for C++ thin client
> And they looks like mixed up in a different order
> Python: {code}d597be47-949e-475b-8918-44ca836798a3{code}
> Java: {code}5b479e94-47be-97d5-a398-6783ca441889{code}
> For example take "ca" in 7-8 number from the end of java uuid
> On left we have "83", but in python "83" stay on right side from "ca"
> Different for "44" which is on right for Java but on left for Python



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message