[jira] [Updated] (IGNITE-12975) pyignte sql query should not try to create a cache

2020-05-02 Thread Dmitry Melnichuk (Jira)


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

Dmitry Melnichuk updated IGNITE-12975:
--
Attachment: IGNITE-12975_Fix_cache_obtaining_method.patch

> pyignte sql query should not try to create a cache
> --
>
> Key: IGNITE-12975
> URL: https://issues.apache.org/jira/browse/IGNITE-12975
> Project: Ignite
>  Issue Type: Bug
>  Components: python
>Affects Versions: 2.7.6
>Reporter: Isaac Zhu
>Priority: Major
> Attachments: IGNITE-12975_Fix_cache_obtaining_method.patch
>
>
> I find in this line:
> [https://github.com/apache/ignite/blob/master/modules/platforms/python/pyignite/client.py#L395]
> When doing an SQL query through the pyignite thin client, it is trying to get 
> the cache by calling "get_or_create_cache". This caused my ignite instance 
> returns an "Authorization error" because I was using an account that only can 
> read cache and does not have permission to create a cache - we implemented a 
> Security Processor in our ignite cluster to handle the authorization. 
> I think here call the "self.get_cache" is enough to perform a SQL query



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-12975) pyignte sql query should not try to create a cache

2020-05-02 Thread Dmitry Melnichuk (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-12975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17097836#comment-17097836
 ] 

Dmitry Melnichuk commented on IGNITE-12975:
---

[~nifeng2xing] you're absolutely right, {{get_cache()}} is enough.

[~isapego] would you mind to apply a fix? 
[^IGNITE-12975_Fix_cache_obtaining_method.patch] 

> pyignte sql query should not try to create a cache
> --
>
> Key: IGNITE-12975
> URL: https://issues.apache.org/jira/browse/IGNITE-12975
> Project: Ignite
>  Issue Type: Bug
>  Components: python
>Affects Versions: 2.7.6
>Reporter: Isaac Zhu
>Priority: Major
> Attachments: IGNITE-12975_Fix_cache_obtaining_method.patch
>
>
> I find in this line:
> [https://github.com/apache/ignite/blob/master/modules/platforms/python/pyignite/client.py#L395]
> When doing an SQL query through the pyignite thin client, it is trying to get 
> the cache by calling "get_or_create_cache". This caused my ignite instance 
> returns an "Authorization error" because I was using an account that only can 
> read cache and does not have permission to create a cache - we implemented a 
> Security Processor in our ignite cluster to handle the authorization. 
> I think here call the "self.get_cache" is enough to perform a SQL query



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (IGNITE-12809) Python client returns fields in wrong order since the 2 row when fields_count>10

2020-05-02 Thread Dmitry Melnichuk (Jira)


[ 
https://issues.apache.org/jira/browse/IGNITE-12809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17097834#comment-17097834
 ] 

Dmitry Melnichuk commented on IGNITE-12809:
---

[~ezhuravl], you are totally correct in pinpointing the problematic code. 
However, you can't just remove the {{sorted()}} function. The {{result}} is of 
type {{dict}}, not {{OrderedDict}}. These types are essentially the same since 
Python 3.6, but the code must be compatible with Python 3.4. In 3.4 the 
{{dict}} object is not retaining the order of its elements, so no sorting will 
lead to more random ordering problems. Instead, the correct sorting should be 
applied.

Here I attached a diff file, that contains a fix for this problem, alone with a 
[^IGNITE-12809_Fix_and_test_value_ordering_for_client_sql.patch]  corresponding 
test case. [~isapego] could you please look it up.

> Python client returns fields in wrong order since the 2 row when 
> fields_count>10
> 
>
> Key: IGNITE-12809
> URL: https://issues.apache.org/jira/browse/IGNITE-12809
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Affects Versions: 2.8
>Reporter: Evgenii Zhuravlev
>Assignee: Igor Sapego
>Priority: Major
>  Labels: python
> Attachments: 
> IGNITE-12809_Fix_and_test_value_ordering_for_client_sql.patch, reproducer.py
>
>
> Reproducer attached. 
> If result set is bigger than a page size(1 by default) and there are more 
> than 10 fields in an object, then, for all rows after the first query column 
> order will be wrong. Looks like column order is being sorted as a string 
> instead of number.
> The reason for that is a sorting in api/sql.py: 
> https://github.com/apache/ignite/blob/master/modules/platforms/python/pyignite/api/sql.py#L445
> If you remove it, everything will work fine. We need to make sure that this 
> is the right solution for this issue.
> Output from reproducer:
> {code:java}
> ['CODE', 'NAME', 'CONTINENT', 'REGION', 'SURFACEAREA', 'INDEPYEAR', 
> 'POPULATION', 'LIFEEXPECTANCY', 'GNP', 'GNPOLD', 'LOCALNAME', 
> 'GOVERNMENTFORM', 'HEADOFSTATE', 'CAPITAL', 'CODE2']
> ['CHN', 'China', 'Asia', 'Eastern Asia', Decimal('9.5729E+6'), -1523, 
> 1277558000, Decimal('71.4'), Decimal('982268'), Decimal('917719'), 
> 'Zhongquo', 'PeoplesRepublic', 'Jiang Zemin', 1891, 'CN']
> ['IND', 'India', 'Bharat/India', 'Federal Republic', 'Kocheril Raman 
> Narayanan', 1109, 'IN', 'Asia', 'Southern and Central Asia', 
> Decimal('3287263'), 1947, 1013662000, Decimal('62.5'), Decimal('447114'), 
> Decimal('430572')]
> ['USA', 'United States', 'United States', 'Federal Republic', 'George W. 
> Bush', 3813, 'US', 'North America', 'North America', Decimal('9.36352E+6'), 
> 1776, 278357000, Decimal('77.1'), Decimal('8.5107E+6'), Decimal('8.1109E+6')]
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (IGNITE-12809) Python client returns fields in wrong order since the 2 row when fields_count>10

2020-05-02 Thread Dmitry Melnichuk (Jira)


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

Dmitry Melnichuk updated IGNITE-12809:
--
Attachment: IGNITE-12809_Fix_and_test_value_ordering_for_client_sql.patch

> Python client returns fields in wrong order since the 2 row when 
> fields_count>10
> 
>
> Key: IGNITE-12809
> URL: https://issues.apache.org/jira/browse/IGNITE-12809
> Project: Ignite
>  Issue Type: Bug
>  Components: platforms
>Affects Versions: 2.8
>Reporter: Evgenii Zhuravlev
>Assignee: Igor Sapego
>Priority: Major
>  Labels: python
> Attachments: 
> IGNITE-12809_Fix_and_test_value_ordering_for_client_sql.patch, reproducer.py
>
>
> Reproducer attached. 
> If result set is bigger than a page size(1 by default) and there are more 
> than 10 fields in an object, then, for all rows after the first query column 
> order will be wrong. Looks like column order is being sorted as a string 
> instead of number.
> The reason for that is a sorting in api/sql.py: 
> https://github.com/apache/ignite/blob/master/modules/platforms/python/pyignite/api/sql.py#L445
> If you remove it, everything will work fine. We need to make sure that this 
> is the right solution for this issue.
> Output from reproducer:
> {code:java}
> ['CODE', 'NAME', 'CONTINENT', 'REGION', 'SURFACEAREA', 'INDEPYEAR', 
> 'POPULATION', 'LIFEEXPECTANCY', 'GNP', 'GNPOLD', 'LOCALNAME', 
> 'GOVERNMENTFORM', 'HEADOFSTATE', 'CAPITAL', 'CODE2']
> ['CHN', 'China', 'Asia', 'Eastern Asia', Decimal('9.5729E+6'), -1523, 
> 1277558000, Decimal('71.4'), Decimal('982268'), Decimal('917719'), 
> 'Zhongquo', 'PeoplesRepublic', 'Jiang Zemin', 1891, 'CN']
> ['IND', 'India', 'Bharat/India', 'Federal Republic', 'Kocheril Raman 
> Narayanan', 1109, 'IN', 'Asia', 'Southern and Central Asia', 
> Decimal('3287263'), 1947, 1013662000, Decimal('62.5'), Decimal('447114'), 
> Decimal('430572')]
> ['USA', 'United States', 'United States', 'Federal Republic', 'George W. 
> Bush', 3813, 'US', 'North America', 'North America', Decimal('9.36352E+6'), 
> 1776, 278357000, Decimal('77.1'), Decimal('8.5107E+6'), Decimal('8.1109E+6')]
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (IGNITE-11897) Use `bytearray` as a Python type for Ignite `ByteArray`

2019-06-05 Thread Dmitry Melnichuk (JIRA)
Dmitry Melnichuk created IGNITE-11897:
-

 Summary: Use `bytearray` as a Python type for Ignite `ByteArray`
 Key: IGNITE-11897
 URL: https://issues.apache.org/jira/browse/IGNITE-11897
 Project: Ignite
  Issue Type: Improvement
  Components: thin client
Reporter: Dmitry Melnichuk
Assignee: Dmitry Melnichuk


This optimization will allow client to read and write `ByteArray` values 
without iterating over single bytes, thereby improving performance.



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


[jira] [Commented] (IGNITE-11854) Serialization of arrays of primitives in python thin client is not optimal

2019-05-18 Thread Dmitry Melnichuk (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-11854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16843138#comment-16843138
 ] 

Dmitry Melnichuk commented on IGNITE-11854:
---

[~eignatiev], you are correct, but there are actually several places in the 
code that can be optimized in this way.

Do you mind if I take over the process of patching?

> Serialization of arrays of primitives in python thin client is not optimal
> --
>
> Key: IGNITE-11854
> URL: https://issues.apache.org/jira/browse/IGNITE-11854
> Project: Ignite
>  Issue Type: Bug
>  Components: thin client
>Affects Versions: 2.7
>Reporter: Denis Mekhanikov
>Assignee: Dmitry Melnichuk
>Priority: Major
>
> The following code hangs indefinitely inside of invocation to 
> {{my_cache.put()}}
> {code:java}
> from pyignite import Client
> arr_len = 3_000_000
> content = bytearray(arr_len)
> for i in range(arr_len):
> content[i] = i % 256
> client = Client()
> client.connect('127.0.0.1', 10800)
> my_cache = client.get_or_create_cache('my cache')
> my_cache.put("key_bin", content){code}
> While the value is only 3MB in size. Implementation of serialization of 
> primitive arrays seems to be quadratic in length of the array.



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


[jira] [Assigned] (IGNITE-11854) Serialization of arrays of primitives in python thin client is not optimal

2019-05-18 Thread Dmitry Melnichuk (JIRA)


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

Dmitry Melnichuk reassigned IGNITE-11854:
-

Assignee: Dmitry Melnichuk

> Serialization of arrays of primitives in python thin client is not optimal
> --
>
> Key: IGNITE-11854
> URL: https://issues.apache.org/jira/browse/IGNITE-11854
> Project: Ignite
>  Issue Type: Bug
>  Components: thin client
>Affects Versions: 2.7
>Reporter: Denis Mekhanikov
>Assignee: Dmitry Melnichuk
>Priority: Major
>
> The following code hangs indefinitely inside of invocation to 
> {{my_cache.put()}}
> {code:java}
> from pyignite import Client
> arr_len = 3_000_000
> content = bytearray(arr_len)
> for i in range(arr_len):
> content[i] = i % 256
> client = Client()
> client.connect('127.0.0.1', 10800)
> my_cache = client.get_or_create_cache('my cache')
> my_cache.put("key_bin", content){code}
> While the value is only 3MB in size. Implementation of serialization of 
> primitive arrays seems to be quadratic in length of the array.



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


[jira] [Commented] (IGNITE-11758) Python thin: a lot of documentation files without license header

2019-04-17 Thread Dmitry Melnichuk (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-11758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16819810#comment-16819810
 ] 

Dmitry Melnichuk commented on IGNITE-11758:
---

# The folder {{modules/platforms/python/docs/source}} with all its content is 
generated automatically by the {{sphinx-apidoc}}, so it can be removed from the 
Ignite repository. But if we do so, the document building will require the 
extra step, and the documents and readme should reflect this change. If it is 
OK, I will make a pull request.
 # Files {{modules/platforms/python/docs/Makefile}} and 
{{modules/platforms/python/docs/conf.py}} are taken from the Sphinx repository. 
This is a standard procedure when using Sphinx. I did minimal changes to 
{{conf.py}}, while left {{Makefile}} unchanged. Sphinx is licensed under some 
variety of BSD license. I could be mistaken, but I felt it would be wrong to 
put Apache license in these files. What should we do with them?

> Python thin: a lot of documentation files without license header
> 
>
> Key: IGNITE-11758
> URL: https://issues.apache.org/jira/browse/IGNITE-11758
> Project: Ignite
>  Issue Type: Bug
>  Components: documentation, thin client
>Affects Versions: 2.7
>Reporter: Igor Sapego
>Assignee: Dmitry Melnichuk
>Priority: Major
> Fix For: 2.8
>
>
> There are a lot of .rst documentation files in modules/platforms/python/docs/ 
> that does not contain license header. We need either delete them if they are 
> auto generated or add headers to them if they are not.



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


[jira] [Assigned] (IGNITE-11758) Python thin: a lot of documentation files without license header

2019-04-16 Thread Dmitry Melnichuk (JIRA)


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

Dmitry Melnichuk reassigned IGNITE-11758:
-

Assignee: Dmitry Melnichuk

> Python thin: a lot of documentation files without license header
> 
>
> Key: IGNITE-11758
> URL: https://issues.apache.org/jira/browse/IGNITE-11758
> Project: Ignite
>  Issue Type: Bug
>  Components: documentation, thin client
>Affects Versions: 2.7
>Reporter: Igor Sapego
>Assignee: Dmitry Melnichuk
>Priority: Major
> Fix For: 2.8
>
>
> There are a lot of .rst documentation files in modules/platforms/python/docs/ 
> that does not contain license header. We need either delete them if they are 
> auto generated or add headers to them if they are not.



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


[jira] [Commented] (IGNITE-11593) python thin client: insert and select VARBINARY data type through SQL

2019-03-22 Thread Dmitry Melnichuk (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-11593?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16798966#comment-16798966
 ] 

Dmitry Melnichuk commented on IGNITE-11593:
---

Today I did a little research on this topic. Seems like Ignite SQL accepts 
VARBINARY data as an UTF8/ASCII string, that consists of hexadecimal digit 
pairs, but returns it as an array of integers, with each integer representing a 
byte value. For example, this code behaves quite as expected:
{code}
client.sql('DROP TABLE test_sql_binary IF EXISTS')
client.sql(
'CREATE TABLE test_sql_binary(id int primary key, varbin VARBINARY)'
)
client.sql(
'INSERT INTO test_sql_binary(id, varbin) VALUES (?, ?)',
query_args=(1, '0123456789abcdef'),
)
result = client.sql('SELECT * FROM test_sql_binary')
data = list(*result)[1]
print(data)
# [1, 35, 69, 103, -119, -85, -51, -17]
{code}
I do not know why Ignite accepts your arguments on server side without throwing 
an SQL error. As for client side, I think this is not a bug.

> python thin client: insert and select VARBINARY data type through SQL
> -
>
> Key: IGNITE-11593
> URL: https://issues.apache.org/jira/browse/IGNITE-11593
> Project: Ignite
>  Issue Type: Bug
>  Components: thin client
>Affects Versions: 2.7
>Reporter: Stepan Pilschikov
>Assignee: Dmitry Melnichuk
>Priority: Major
>
> varbin data type select is getting not parsed array of integer values
> Example:
> https://gist.github.com/pilshchikov/b98ce5514209ef7009099b9c188398a6



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


[jira] [Updated] (IGNITE-11593) python thin client: insert and select VARBINARY data type through SQL

2019-03-22 Thread Dmitry Melnichuk (JIRA)


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

Dmitry Melnichuk updated IGNITE-11593:
--
Labels: python  (was: )

> python thin client: insert and select VARBINARY data type through SQL
> -
>
> Key: IGNITE-11593
> URL: https://issues.apache.org/jira/browse/IGNITE-11593
> Project: Ignite
>  Issue Type: Bug
>  Components: thin client
>Affects Versions: 2.7
>Reporter: Stepan Pilschikov
>Assignee: Dmitry Melnichuk
>Priority: Major
>  Labels: python
>
> varbin data type select is getting not parsed array of integer values
> Example:
> https://gist.github.com/pilshchikov/b98ce5514209ef7009099b9c188398a6



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


[jira] [Commented] (IGNITE-10691) thin clients: PY, PHP and NodeJS clients mixed up UUID taken from Java or C++ client

2019-03-19 Thread Dmitry Melnichuk (JIRA)


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

Dmitry Melnichuk commented on IGNITE-10691:
---

Added a test.

> thin clients:  PY, PHP and NodeJS clients mixed up UUID taken from Java or 
> C++ client
> -
>
> 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 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 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 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 cache = igniteClient.getOrCreateCache("UUID_PH");
> UUID id = cache.get(1);
> System.out.println(id);
> {code}
> Java output
> {code}
> dc427ae0-ed2f-0fee-cd0a-38c78f7f59aa
> {code}



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


[jira] [Comment Edited] (IGNITE-10691) thin clients: PY, PHP and NodeJS clients mixed up UUID taken from Java or C++ client

2019-03-19 Thread Dmitry Melnichuk (JIRA)


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

Dmitry Melnichuk edited comment on IGNITE-10691 at 3/19/19 6:23 AM:


I have created a pull request for this issue in Python thin client. Please 
evaluate and apply.

[https://github.com/apache/ignite/pull/6296]


was (Author: melnichuk):
https://github.com/apache/ignite/pull/6296

> thin clients:  PY, PHP and NodeJS clients mixed up UUID taken from Java or 
> C++ client
> -
>
> 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 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 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 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 cache = igniteClient.getOrCreateCache("UUID_PH");
> UUID id = cache.get(1);
> System.out.println(id);
> {code}
> Java output
> {code}
> dc427ae0-ed2f-0fee-cd0a-38c78f7f59aa
> {code}



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


[jira] [Commented] (IGNITE-11502) Django engine

2019-03-11 Thread Dmitry Melnichuk (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-11502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16789750#comment-16789750
 ] 

Dmitry Melnichuk commented on IGNITE-11502:
---

Sorry if I was unclear in my first comment. I have never used Django with 
Ignite. I just have some experience with web development with Django, and I 
also developing a Python thin client for Ignite. These two of my activities are 
totally unrelated to each other.

Django uses RDBMS for storing data. It also optionally uses key-value storage 
(memcached or redis) for various internal caching (sessions, queries, template 
prerenders, et c.). I thought of how nice it would be to use Ignite in both 
roles, but I came to conclusion that the database part is impossible without 
autoincrement fields in Ignite SQL.

Django expects of all its models to have an implicit primary key of name `id` 
and type 
[AutoField|https://docs.djangoproject.com/en/2.2/_modules/django/db/models/fields/#AutoField].
 It is possible to set an explicit primary key of any type in your custom 
model, but not in Django admin models. It means that vanilla Django, likewise 
many Django extensions, could not be deployed in such a configuration without 
AutoField support in default database backend. And AutoField definition is 
outside of `django.db.backends` scope, so you can not easily change PK 
implementation in favor of, say, UUID.

On the other hand, the solution could be easier than I initially thought it is. 
There is already an [implementation of cluster-wide incremental 
counter|https://apacheignite.readme.io/docs/id-generator] in Ignite. All what 
is left is to make it available through the Ignite SQL. Then there is an [ODBC 
backend for Django|https://github.com/lionheart/django-pyodbc]. It may make 
sense, before other things, to see if it is compatible with the current Ignite 
ODBC driver. But, as I said earlier, without Ignite SQL supporting 
autoincrement fields the applicability of such a bundle will be limited or none.

> Django engine
> -
>
> Key: IGNITE-11502
> URL: https://issues.apache.org/jira/browse/IGNITE-11502
> Project: Ignite
>  Issue Type: New Feature
>Reporter: Nikolai Svistov
>Priority: Critical
>
> Django supports a standard driver for working with DB.
> To work with cassandra, there is a driver - [Django Cassandra 
> Engine|https://github.com/r4fek/django-cassandra-engine], but Apache Ignite 
> doesn’t have a driver that allows users to work with Ignite from Django.



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


[jira] [Commented] (IGNITE-11502) Django engine

2019-03-10 Thread Dmitry Melnichuk (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-11502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16789176#comment-16789176
 ] 

Dmitry Melnichuk commented on IGNITE-11502:
---

I am sorry to interfere, but I used Django a lot, and I think that implement a 
database engine for Ignite will be nearly impossible without implementing 
IGNITE-5625 first.

> Django engine
> -
>
> Key: IGNITE-11502
> URL: https://issues.apache.org/jira/browse/IGNITE-11502
> Project: Ignite
>  Issue Type: New Feature
>Reporter: Nikolai Svistov
>Priority: Critical
>
> Django supports a standard driver for working with DB.
> To work with cassandra, there is a driver - [Django Cassandra 
> Engine|https://github.com/r4fek/django-cassandra-engine], but Apache Ignite 
> doesn’t have a driver that allows users to work with Ignite from Django.



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


[jira] [Updated] (IGNITE-11303) Python thin client: best effort affinity

2019-02-12 Thread Dmitry Melnichuk (JIRA)


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

Dmitry Melnichuk updated IGNITE-11303:
--
Affects Version/s: 2.7

> Python thin client: best effort affinity
> 
>
> Key: IGNITE-11303
> URL: https://issues.apache.org/jira/browse/IGNITE-11303
> Project: Ignite
>  Issue Type: Task
>  Components: thin client
>Affects Versions: 2.7
>Reporter: Dmitry Melnichuk
>Assignee: Dmitry Melnichuk
>Priority: Major
>  Labels: Python, Python3, iep-23, thin
>
> The goal is to implement 
> [IEP-23|https://cwiki.apache.org/confluence/display/IGNITE/IEP-23%3A+Best+Effort+Affinity+for+thin+clients]
>  using background thread (`threading` module).



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


[jira] [Updated] (IGNITE-11303) Python thin client: best effort affinity

2019-02-12 Thread Dmitry Melnichuk (JIRA)


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

Dmitry Melnichuk updated IGNITE-11303:
--
Issue Type: New Feature  (was: Task)

> Python thin client: best effort affinity
> 
>
> Key: IGNITE-11303
> URL: https://issues.apache.org/jira/browse/IGNITE-11303
> Project: Ignite
>  Issue Type: New Feature
>  Components: thin client
>Affects Versions: 2.7
>Reporter: Dmitry Melnichuk
>Assignee: Dmitry Melnichuk
>Priority: Major
>  Labels: Python, Python3, iep-23, thin
> Fix For: 2.8
>
>
> The goal is to implement 
> [IEP-23|https://cwiki.apache.org/confluence/display/IGNITE/IEP-23%3A+Best+Effort+Affinity+for+thin+clients]
>  using background thread (`threading` module).



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


[jira] [Updated] (IGNITE-11303) Python thin client: best effort affinity

2019-02-12 Thread Dmitry Melnichuk (JIRA)


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

Dmitry Melnichuk updated IGNITE-11303:
--
Fix Version/s: 2.8

> Python thin client: best effort affinity
> 
>
> Key: IGNITE-11303
> URL: https://issues.apache.org/jira/browse/IGNITE-11303
> Project: Ignite
>  Issue Type: Task
>  Components: thin client
>Affects Versions: 2.7
>Reporter: Dmitry Melnichuk
>Assignee: Dmitry Melnichuk
>Priority: Major
>  Labels: Python, Python3, iep-23, thin
> Fix For: 2.8
>
>
> The goal is to implement 
> [IEP-23|https://cwiki.apache.org/confluence/display/IGNITE/IEP-23%3A+Best+Effort+Affinity+for+thin+clients]
>  using background thread (`threading` module).



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


[jira] [Created] (IGNITE-11303) Python thin client: best effort affinity

2019-02-12 Thread Dmitry Melnichuk (JIRA)
Dmitry Melnichuk created IGNITE-11303:
-

 Summary: Python thin client: best effort affinity
 Key: IGNITE-11303
 URL: https://issues.apache.org/jira/browse/IGNITE-11303
 Project: Ignite
  Issue Type: Task
  Components: thin client
Reporter: Dmitry Melnichuk
Assignee: Dmitry Melnichuk


The goal is to implement 
[IEP-23|https://cwiki.apache.org/confluence/display/IGNITE/IEP-23%3A+Best+Effort+Affinity+for+thin+clients]
 using background thread (`threading` module).



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


[jira] [Commented] (IGNITE-10230) Putting collection of timestamps fails on python thin client

2018-11-30 Thread Dmitry Melnichuk (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16704483#comment-16704483
 ] 

Dmitry Melnichuk commented on IGNITE-10230:
---

Yes, absolutely.

> Putting collection of timestamps fails on python thin client 
> -
>
> Key: IGNITE-10230
> URL: https://issues.apache.org/jira/browse/IGNITE-10230
> Project: Ignite
>  Issue Type: Task
>  Components: thin client
>Affects Versions: 2.6
>Reporter: Pavel Petroshenko
>Assignee: Dmitry Melnichuk
>Priority: Major
> Fix For: 2.8
>
>
> Here's the test that fails: 
> https://gist.github.com/pilshchikov/7434805b7d95973afe600e1c0c83d17a



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


[jira] [Commented] (IGNITE-10230) Putting collection of timestamps fails on python thin client

2018-11-29 Thread Dmitry Melnichuk (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16704278#comment-16704278
 ] 

Dmitry Melnichuk commented on IGNITE-10230:
---

Ticket is fixed in IGNITE-10358.

> Putting collection of timestamps fails on python thin client 
> -
>
> Key: IGNITE-10230
> URL: https://issues.apache.org/jira/browse/IGNITE-10230
> Project: Ignite
>  Issue Type: Task
>  Components: thin client
>Affects Versions: 2.6
>Reporter: Pavel Petroshenko
>Assignee: Dmitry Melnichuk
>Priority: Major
> Fix For: 2.8
>
>
> Here's the test that fails: 
> https://gist.github.com/pilshchikov/7434805b7d95973afe600e1c0c83d17a



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


[jira] [Updated] (IGNITE-10358) thin python: put collections have no data type specification

2018-11-22 Thread Dmitry Melnichuk (JIRA)


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

Dmitry Melnichuk updated IGNITE-10358:
--
Fix Version/s: (was: 2.7)
   2.8

> thin python: put collections have no data type specification
> 
>
> Key: IGNITE-10358
> URL: https://issues.apache.org/jira/browse/IGNITE-10358
> Project: Ignite
>  Issue Type: Bug
>  Components: thin client
>Affects Versions: 2.7
>Reporter: Stepan Pilschikov
>Assignee: Dmitry Melnichuk
>Priority: Major
>  Labels: python
> Fix For: 2.8
>
>
> Trying to put collection with Integers through python thin client and get 
> through others clients
> Value type in others clients specified as "collection with Integers"
>  
> During GET operation clients throwing exceptions that "type wrong, expected 
> Integer type but getting Long type" (because python collection data types are 
> not specified)
> Python put and php and js get code/output: 
> https://gist.github.com/pilshchikov/7ba7a7a2568c758b7b8680ba9a4215f5
> Also same behavior right for Map data type



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


[jira] [Commented] (IGNITE-10230) Putting collection of timestamps fails on python thin client

2018-11-22 Thread Dmitry Melnichuk (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16695716#comment-16695716
 ] 

Dmitry Melnichuk commented on IGNITE-10230:
---

This task partially duplicates IGNITE-10358. Please see the comment and pull 
request there.

The code

{code:python}
cache.put(1, (1, [
(datetime.strptime('2018-10-31T19:43:34.264437', '%Y-%m-%dT%H:%M:%S.%f'), 
264437),
(datetime.strptime('2018-10-31T19:43:34.264438', '%Y-%m-%dT%H:%M:%S.%f'), 
264438),
]), key_hint=IntObject, value_hint=CollectionObject)
{code}

should be rephrased as

{code:python}
cache.put(1, (1, [
((datetime.strptime('2018-10-31T19:43:34.264437', '%Y-%m-%dT%H:%M:%S.%f'), 
264437), TimestampObject),
((datetime.strptime('2018-10-31T19:43:34.264438', '%Y-%m-%dT%H:%M:%S.%f'), 
264438), TimestampObject)
]), key_hint=IntObject, value_hint=CollectionObject)
{code}

This looks quite ugly, but {{Timestamp}} have no direct analog in Python 
standard data types. I feel that some clumsiness was inevitable.

> Putting collection of timestamps fails on python thin client 
> -
>
> Key: IGNITE-10230
> URL: https://issues.apache.org/jira/browse/IGNITE-10230
> Project: Ignite
>  Issue Type: Task
>  Components: thin client
>Affects Versions: 2.6
>Reporter: Pavel Petroshenko
>Assignee: Dmitry Melnichuk
>Priority: Major
> Fix For: 2.8
>
>
> Here's the test that fails: 
> https://gist.github.com/pilshchikov/7434805b7d95973afe600e1c0c83d17a



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


[jira] [Commented] (IGNITE-10358) thin python: put collections have no data type specification

2018-11-22 Thread Dmitry Melnichuk (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-10358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16695695#comment-16695695
 ] 

Dmitry Melnichuk commented on IGNITE-10358:
---

Since pythonic {{int}} type is of arbitrary size, or unbounded, I chose Ignite 
{{Long}} type, as a type with the widest bounds, for its default representation.

Default behavior can always be overridden with a type hint. To quote the 
current {{pyignite}} documents:
{quote}Nearly any structure element (inside dict or list) can be replaced with 
a two-tuple of (said element, type hint).
{quote}
Unfortunately, there was a bug that prevented the use of type hints inside 
{{CollectionObject}} specifically. The related pull request fix it.

Now the snipped can be modified to work with other clients: 
{code}
from pyignite import Client
from pyignite.datatypes import *


client = Client()
client.connect('127.0.0.1', 10800)
cache = client.get_or_create_cache("ARRAY_LIST_INTEGER_PY")
cache.put(1, (0, [
(-2147483647, IntObject),
(0, IntObject),
(2147483647, IntObject),
]), key_hint=IntObject, value_hint=CollectionObject)
{code}
 

> thin python: put collections have no data type specification
> 
>
> Key: IGNITE-10358
> URL: https://issues.apache.org/jira/browse/IGNITE-10358
> Project: Ignite
>  Issue Type: Bug
>  Components: thin client
>Affects Versions: 2.7
>Reporter: Stepan Pilschikov
>Assignee: Dmitry Melnichuk
>Priority: Major
>  Labels: python
> Fix For: 2.7
>
>
> Trying to put collection with Integers through python thin client and get 
> through others clients
> Value type in others clients specified as "collection with Integers"
>  
> During GET operation clients throwing exceptions that "type wrong, expected 
> Integer type but getting Long type" (because python collection data types are 
> not specified)
> Python put and php and js get code/output: 
> https://gist.github.com/pilshchikov/7ba7a7a2568c758b7b8680ba9a4215f5
> Also same behavior right for Map data type



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


[jira] [Updated] (IGNITE-10358) thin python: put collections have no data type specification

2018-11-22 Thread Dmitry Melnichuk (JIRA)


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

Dmitry Melnichuk updated IGNITE-10358:
--
Labels: python  (was: python thin)

> thin python: put collections have no data type specification
> 
>
> Key: IGNITE-10358
> URL: https://issues.apache.org/jira/browse/IGNITE-10358
> Project: Ignite
>  Issue Type: Bug
>  Components: thin client
>Affects Versions: 2.7
>Reporter: Stepan Pilschikov
>Assignee: Dmitry Melnichuk
>Priority: Major
>  Labels: python
> Fix For: 2.7
>
>
> Trying to put collection with Integers through python thin client and get 
> through others clients
> Value type in others clients specified as "collection with Integers"
>  
> During GET operation clients throwing exceptions that "type wrong, expected 
> Integer type but getting Long type" (because python collection data types are 
> not specified)
> Python put and php and js get code/output: 
> https://gist.github.com/pilshchikov/7ba7a7a2568c758b7b8680ba9a4215f5
> Also same behavior right for Map data type



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


[jira] [Commented] (IGNITE-9991) thin clients: can't use array as cache key for PHP, JS and Python clients

2018-10-24 Thread Dmitry Melnichuk (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16663070#comment-16663070
 ] 

Dmitry Melnichuk commented on IGNITE-9991:
--

I can confirm the bug on Python. Moreover, I did similar test with Java, and 
got similar results. Looks like it is a server bug. Maybe we should re-target 
the issue?

Java code (sorry, I am no good in languages other than Python):


{code:java}
import org.apache.ignite.Ignition;
import org.apache.ignite.client.ClientCache;
import org.apache.ignite.client.IgniteClient;
import org.apache.ignite.configuration.ClientConfiguration;
import org.apache.ignite.client.ClientException;

public class ArrayKey {
public static void main(String[] args) {
ClientConfiguration cfg = new 
ClientConfiguration().setAddresses("127.0.0.1:10800");
try (IgniteClient igniteClient = Ignition.startClient(cfg)) {
ClientCache cache = 
igniteClient.getOrCreateCache("test");
Boolean[] array_key = new Boolean[2];
array_key[0] = true;
array_key[1] = false;
cache.put(array_key, 42);
System.out.println("Reach get()");
int result = cache.get(array_key);
System.out.println(result);

} catch (ClientException e) {
System.err.println(e.getMessage());
} catch (Exception e) {
System.err.format("Unexpected failure: %s\n", e);
}
}
}
{code}

Output:

{code}
Reach get()
Unexpected failure: java.lang.NullPointerException
{code}

> thin clients: can't use array as cache key for PHP, JS and Python clients
> -
>
> Key: IGNITE-9991
> URL: https://issues.apache.org/jira/browse/IGNITE-9991
> Project: Ignite
>  Issue Type: Bug
>  Components: thin client
>Affects Versions: 2.7
>Reporter: Stepan Pilschikov
>Priority: Major
>
> Trying to put cache with key as values array
> Put Py code
> {code}
> cache = client.get_or_create_cache("PY_BOOLEAN_ARRAY")
> cache.put([True, False], 1, key_hint=BoolArrayObject, value_hint=IntObject)
> {code}
> Get
> {code}
> cache = client.get_or_create_cache("PY_BOOLEAN_ARRAY")
> print(cache.get([True, False] key_hint=BoolArrayObject))
> {code}
> output: null
> Same thing with PHP, JS clients and all others array data types



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


[jira] [Commented] (IGNITE-9950) thin python: Decimal data type didn't match with others clients

2018-10-22 Thread Dmitry Melnichuk (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16658833#comment-16658833
 ] 

Dmitry Melnichuk commented on IGNITE-9950:
--

I already had some tests for the internal consistency of all datatypes' 
representation, including `Decimal`. Unfortunately, they did not help me to 
avoid this issue. (Though it did help to fix it, but that is another matter.)

The regressions of this kind can be detected only by interfacing with the 
reference client. I used Java client manually. TBH I have no idea of how to 
perform such tests automatically. Is it possible with our CI to launch Java and 
Python clients in sequence, against the same Ignite cluster?

> thin python: Decimal data type didn't match with others clients
> ---
>
> Key: IGNITE-9950
> URL: https://issues.apache.org/jira/browse/IGNITE-9950
> Project: Ignite
>  Issue Type: Bug
>  Components: thin client
>Affects Versions: 2.7
> Environment: Ignite 2.7 latest sources
> default cache configuration
> Python 3.7
> nodejs 10+
> PHP 7.2+
> Ubuntu 17
>Reporter: Stepan Pilschikov
>Assignee: Dmitry Melnichuk
>Priority: Major
> Fix For: 2.7
>
>
> Trying to put Decimal value from JS or PHP client and get with Python, but 
> exception throwing
> JS code:
> {code}
> IgniteClient = require('apache-ignite-client');
> IgniteClientConfiguration = IgniteClient.IgniteClientConfiguration;
> const Decimal = IgniteClient.Decimal;
> const ObjectType = IgniteClient.ObjectType;
> ENDPOINT = '127.0.0.1:10800';
> igniteClient = new IgniteClient();
> async function start() {
> await igniteClient.connect(new IgniteClientConfiguration(ENDPOINT));
> try {
> cache = (await igniteClient.getOrCreateCache("JS_DECIMAL"))
> .setKeyType(ObjectType.PRIMITIVE_TYPE.INTEGER)
> .setValueType(ObjectType.PRIMITIVE_TYPE.DECIMAL);
> await cache.put(1, new Decimal('7.7'));
> } finally {
> igniteClient.disconnect();
> }
> }
> start();
> {code}
> Python get code
> {code}
> from pyignite import Client
> from pyignite.datatypes import *
> client = Client()
> client.connect('127.0.0.1', 10800)
> cache = client.get_or_create_cache("JS_DECIMAL")
> print(str(cache.get(1, key_hint=IntObject)))
> {code}
> exception in python
> {code}
> Traceback (most recent call last):
>   File get_value_JS_DECIMAL.py", line 7, in 
> print(str(cache.get(1, key_hint=IntObject)))
>   File "[ignite_src]/platforms/python/pyignite/utils.py", line 163, in 
> ste_wrapper
> result = fn(*args, **kwargs)
>   File "[ignite_src]/platforms/python/pyignite/cache.py", line 200, in get
> result = cache_get(self._client, self._cache_id, key, key_hint=key_hint)
>   File "[ignite_src]/platforms/python/pyignite/api/key_value.py", line 107, 
> in cache_get
> ('value', AnyDataObject),
>   File "[ignite_src]/platforms/python/pyignite/queries/__init__.py", line 
> 291, in perform
> result.value = response_struct.to_python(response)
>   File "[ignite_src]/platforms/python/pyignite/queries/__init__.py", line 96, 
> in to_python
> *args, **kwargs
>   File "[ignite_src]/platforms/python/pyignite/datatypes/internal.py", line 
> 288, in to_python
> return data_class.to_python(ctype_object)
>   File "[ignite_src]/platforms/python/pyignite/datatypes/standard.py", line 
> 183, in to_python
> result = decimal.Decimal(data.decode(PROTOCOL_STRING_ENCODING))
> decimal.InvalidOperation: []
> {code}
> When trying with PHP have same exception
> Also when use Decimal from Python others clients return different value:
> Python decimal put code
> {code} 
> from pyignite import Client
> from pyignite.datatypes import *
> from decimal import Decimal
> client = Client()
> client.connect('127.0.0.1', 10800)
> cache = client.get_or_create_cache("PY_DECIMAL")
> cache.put(1, Decimal('7.7'), key_hint=IntObject, value_hint=DecimalObject)
> {code}
> JS get
> {code}
> IgniteClient = require('apache-ignite-client');
> IgniteClientConfiguration = IgniteClient.IgniteClientConfiguration;
> const ObjectType = IgniteClient.ObjectType;
> ENDPOINT = '127.0.0.1:10800';
> igniteClient = new IgniteClient();
> async function start() {
> await igniteClient.connect(new IgniteClientConfiguration(ENDPOINT));
> try {
> cache = (await igniteClient.getOrCreateCache("PY_DECIMAL"))
> .setKeyType(ObjectType.PRIMITIVE_TYPE.INTEGER);
> console.log(await cache.get(1));
> } finally {
> igniteClient.disconnect();
> }
> }
> start();
> {code}
> JS return '141350' value
> PHP have same behavior as JS



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


[jira] [Assigned] (IGNITE-9950) thin python: Decimal data type didn't match with others clients

2018-10-19 Thread Dmitry Melnichuk (JIRA)


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

Dmitry Melnichuk reassigned IGNITE-9950:


Assignee: Dmitry Melnichuk

> thin python: Decimal data type didn't match with others clients
> ---
>
> Key: IGNITE-9950
> URL: https://issues.apache.org/jira/browse/IGNITE-9950
> Project: Ignite
>  Issue Type: Bug
>  Components: thin client
>Affects Versions: 2.7
> Environment: Ignite 2.7 latest sources
> default cache configuration
> Python 3.7
> nodejs 10+
> PHP 7.2+
> Ubuntu 17
>Reporter: Stepan Pilschikov
>Assignee: Dmitry Melnichuk
>Priority: Major
>
> Trying to put Decimal value from JS or PHP client and get with Python, but 
> exception throwing
> JS code:
> {code}
> IgniteClient = require('apache-ignite-client');
> IgniteClientConfiguration = IgniteClient.IgniteClientConfiguration;
> const Decimal = IgniteClient.Decimal;
> const ObjectType = IgniteClient.ObjectType;
> ENDPOINT = '127.0.0.1:10800';
> igniteClient = new IgniteClient();
> async function start() {
> await igniteClient.connect(new IgniteClientConfiguration(ENDPOINT));
> try {
> cache = (await igniteClient.getOrCreateCache("JS_DECIMAL"))
> .setKeyType(ObjectType.PRIMITIVE_TYPE.INTEGER)
> .setValueType(ObjectType.PRIMITIVE_TYPE.DECIMAL);
> await cache.put(1, new Decimal('7.7'));
> } finally {
> igniteClient.disconnect();
> }
> }
> start();
> {code}
> Python get code
> {code}
> from pyignite import Client
> from pyignite.datatypes import *
> client = Client()
> client.connect('127.0.0.1', 10800)
> cache = client.get_or_create_cache("JS_DECIMAL")
> print(str(cache.get(1, key_hint=IntObject)))
> {code}
> exception in python
> {code}
> Traceback (most recent call last):
>   File get_value_JS_DECIMAL.py", line 7, in 
> print(str(cache.get(1, key_hint=IntObject)))
>   File "[ignite_src]/platforms/python/pyignite/utils.py", line 163, in 
> ste_wrapper
> result = fn(*args, **kwargs)
>   File "[ignite_src]/platforms/python/pyignite/cache.py", line 200, in get
> result = cache_get(self._client, self._cache_id, key, key_hint=key_hint)
>   File "[ignite_src]/platforms/python/pyignite/api/key_value.py", line 107, 
> in cache_get
> ('value', AnyDataObject),
>   File "[ignite_src]/platforms/python/pyignite/queries/__init__.py", line 
> 291, in perform
> result.value = response_struct.to_python(response)
>   File "[ignite_src]/platforms/python/pyignite/queries/__init__.py", line 96, 
> in to_python
> *args, **kwargs
>   File "[ignite_src]/platforms/python/pyignite/datatypes/internal.py", line 
> 288, in to_python
> return data_class.to_python(ctype_object)
>   File "[ignite_src]/platforms/python/pyignite/datatypes/standard.py", line 
> 183, in to_python
> result = decimal.Decimal(data.decode(PROTOCOL_STRING_ENCODING))
> decimal.InvalidOperation: []
> {code}
> When trying with PHP have same exception
> Also when use Decimal from Python others clients return different value:
> Python decimal put code
> {code} 
> from pyignite import Client
> from pyignite.datatypes import *
> from decimal import Decimal
> client = Client()
> client.connect('127.0.0.1', 10800)
> cache = client.get_or_create_cache("PY_DECIMAL")
> cache.put(1, Decimal('7.7'), key_hint=IntObject, value_hint=DecimalObject)
> {code}
> JS get
> {code}
> IgniteClient = require('apache-ignite-client');
> IgniteClientConfiguration = IgniteClient.IgniteClientConfiguration;
> const ObjectType = IgniteClient.ObjectType;
> ENDPOINT = '127.0.0.1:10800';
> igniteClient = new IgniteClient();
> async function start() {
> await igniteClient.connect(new IgniteClientConfiguration(ENDPOINT));
> try {
> cache = (await igniteClient.getOrCreateCache("PY_DECIMAL"))
> .setKeyType(ObjectType.PRIMITIVE_TYPE.INTEGER);
> console.log(await cache.get(1));
> } finally {
> igniteClient.disconnect();
> }
> }
> start();
> {code}
> JS return '141350' value
> PHP have same behavior as JS



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


[jira] [Comment Edited] (IGNITE-7782) Thin Client lib: Python

2018-10-19 Thread Dmitry Melnichuk (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-7782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16656439#comment-16656439
 ] 

Dmitry Melnichuk edited comment on IGNITE-7782 at 10/19/18 8:28 AM:


The client was successfully tested on the following 
OSes/architectures/platforms:
 * Arch Linux, AMD64, Python 3.4, 3.6, 3.7;
 * Ubuntu Server 16.04, i386, Python 3.5\*;
 * Windows Server 2008 R2, x86-64, Python 3.7;
 * Windows 10 Home N, x86-32, Python 3.7,
 * FreeBSD 11.2, AMD64, Python 3.6;
 * FreeBSD 11.2, i386, Python 3.6.

\* _pip_ in Ubuntu 16.04 repository is outdated. Make sure to uninstall it, 
than install with 
[get-pip|https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py] 
script.


was (Author: melnichuk):
The client was successfully tested on the following 
OSes/architectures/platforms:
 * Arch Linux, AMD64, Python 3.4, 3.6, 3.7;
 * Ubuntu Server 16.04, i386, Python 3.5***;
 * Windows Server 2008 R2, x86-64, Python 3.7;
 * Windows 10 Home N, x86-32, Python 3.7,
 * FreeBSD 11.2, AMD64, Python 3.6;
 * FreeBSD 11.2, i386, Python 3.6.

*** _pip_ in Ubuntu 16.04 repository is outdated. Make sure to uninstall it, 
than install with 
[get-pip|https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py] 
script.

> Thin Client lib: Python
> ---
>
> Key: IGNITE-7782
> URL: https://issues.apache.org/jira/browse/IGNITE-7782
> Project: Ignite
>  Issue Type: New Feature
>  Components: thin client
>Affects Versions: 2.7
>Reporter: Alexey Kosenchuk
>Assignee: Dmitry Melnichuk
>Priority: Major
>  Labels: pull-request-available
> Fix For: 2.7
>
>
> Implement Thin (lightweight) Client lib in Python programming language for 
> Ignite Binary Client Protocol 
> [https://apacheignite.readme.io/docs/binary-client-protocol]
> Prototype:
>  [https://github.com/skozlov-gridgain/apache-ignite-python-thin-client]
> Example - NodeJS client - IGNITE-
>  [https://github.com/nobitlost/ignite/tree/master/modules/platforms/nodejs]
> ---
> h5. Package name (for use with setuptools/PyPI):
> pyignite
> h5. Location of the lib in the repository:
> .../modules/platforms/python
> h5. Python version:
> 3.4+ (tested on 3.4 and 3.6)
> h5. Ignite version:
> 2.7.
> h5. Architecture:
> Syncronous (safe for use with threading/multiprocessing), object-oriented.
> h5. Documentation:
> Sphinx/autodoc + readme.md
> h5. Test framework:
> pytest, pytest-runner for setuptools pytest integration.
> h5. Usage examples included:
> - cache management (creating, configuring, deleting),
> - key-value operations,
> - cache scan,
> - basic SQL queries,
> - simple and advanced work with Complex objects,
> - fail-over connection.
> h5. Goal:
> Create a full-featured Ignite thin client library:
> - carefully implement, test, and document all the features of the binary 
> protocol, that can be useful in Python programs,
> - implement and document features like type IDs or serialization hints, that 
> are mostly useless in Python, for interoperability's sake,
> - skip features, that are not applicable to Python programs, like filter 
> object in scan query.
> h5. Proposed scope of features:
> - basic and SSL-wrapped TCP connection,
> - authentication and authorization,
> - failover mechanism,
> - all datatypes,
> - all client operations (except Binary-Type operations with type names).



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


[jira] [Commented] (IGNITE-9908) thin python: Can't use client with windows

2018-10-19 Thread Dmitry Melnichuk (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-9908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16656441#comment-16656441
 ] 

Dmitry Melnichuk commented on IGNITE-9908:
--

The client was successfully tested on the following 
OSes/architectures/platforms:
 * Arch Linux, AMD64, Python 3.4, 3.6, 3.7;
 * Ubuntu Server 16.04, i386, Python 3.5\*;
 * Windows Server 2008 R2, x86-64, Python 3.7;
 * Windows 10 Home N, x86-32, Python 3.7,
 * FreeBSD 11.2, AMD64, Python 3.6;
 * FreeBSD 11.2, i386, Python 3.6.

\* _pip_ in Ubuntu 16.04 repository is outdated. Make sure to uninstall it, 
than install with 
[get-pip|https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py] 
script.

> thin python: Can't use client with windows
> --
>
> Key: IGNITE-9908
> URL: https://issues.apache.org/jira/browse/IGNITE-9908
> Project: Ignite
>  Issue Type: Bug
>  Components: thin client
>Affects Versions: 2.7
> Environment: Windows 10 1803
> Python 3.7
> Client module installed from latest sources, branch - master 
> Ignite compiled from latest sources
>Reporter: Stepan Pilschikov
>Assignee: Dmitry Melnichuk
>Priority: Major
>  Labels: windows
> Fix For: 2.7
>
>
> Trying to use thin python client on Windows and have exception
> Python excetion:
> {code}
> Traceback (most recent call last):
>   File "C:\dev\test\put_value.py", line 5, in 
> cache = client.get_or_create_cache("test_3")
>   File "[ignite path]\platforms\python\pyignite\client.py", line 306, in 
> get_or_create_cache
> return Cache(self, settings, with_get=True)
>   File "[ignite path]\platforms\python\pyignite\cache.py", line 116, in 
> __init__
> result = func(client, settings)
>   File "[ignite path]\platforms\python\pyignite\api\cache_config.py", line 
> 151, in cache_get_or_create
> 'cache_name': name,
>   File "[ignite path]\platforms\python\pyignite\queries\__init__.py", line 
> 287, in perform
> response_ctype, recv_buffer = response_struct.parse(conn)
>   File "[ignite path]\platforms\python\pyignite\queries\__init__.py", line 
> 66, in parse
> buffer = client.recv(ctypes.sizeof(header_class))
>   File "[ignite path]\platforms\python\pyignite\connection\__init__.py", line 
> 292, in recv
> result += self._recv(buffersize-pref_size, flags)
>   File "[ignite path]\platforms\python\pyignite\connection\__init__.py", line 
> 316, in _recv
> raise SocketError('Socket connection broken.')
> OSError: Socket connection broken.
> {code}
> In ignite logs:
> {code}
> [11:19:20,522][SEVERE][client-connector-#47][ClientListenerNioListener] 
> Failed to parse client request.
> class org.apache.ignite.binary.BinaryObjectException: Unexpected field type 
> [pos=10, expected=String, actual=0]
> at 
> org.apache.ignite.internal.binary.BinaryReaderExImpl.checkFlagNoHandles(BinaryReaderExImpl.java:1679)
> at 
> org.apache.ignite.internal.binary.BinaryReaderExImpl.readString(BinaryReaderExImpl.java:1057)
> at 
> org.apache.ignite.internal.processors.platform.client.cache.ClientCacheGetOrCreateWithNameRequest.(ClientCacheGetOrCreateWithNameRequest.java:41)
> at 
> org.apache.ignite.internal.processors.platform.client.ClientMessageParser.decode(ClientMessageParser.java:342)
> at 
> org.apache.ignite.internal.processors.platform.client.ClientMessageParser.decode(ClientMessageParser.java:238)
> at 
> org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:140)
> at 
> org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:45)
> at 
> org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
> at 
> org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
> at 
> org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
> at 
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
> at 
> org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> {code}
> Python code:
> {code}
> from pyignite import Client
> client = Client()
> client.connect('127.0.0.1', 10800)
> cache = client.get_or_create_cache("test_3")
> cache.put("key3", -3.3)
> {code}
> All others thin clients from same sources and on the same ignite binary works 
> well
> On linux from same sources python 

[jira] [Commented] (IGNITE-7782) Thin Client lib: Python

2018-10-19 Thread Dmitry Melnichuk (JIRA)


[ 
https://issues.apache.org/jira/browse/IGNITE-7782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16656439#comment-16656439
 ] 

Dmitry Melnichuk commented on IGNITE-7782:
--

The client was successfully tested on the following 
OSes/architectures/platforms:
 * Arch Linux, AMD64, Python 3.4, 3.6, 3.7;
 * Ubuntu Server 16.04, i386, Python 3.5***;
 * Windows Server 2008 R2, x86-64, Python 3.7;
 * Windows 10 Home N, x86-32, Python 3.7,
 * FreeBSD 11.2, AMD64, Python 3.6;
 * FreeBSD 11.2, i386, Python 3.6.

*** _pip_ in Ubuntu 16.04 repository is outdated. Make sure to uninstall it, 
than install with 
[get-pip|https://pip.pypa.io/en/stable/installing/#installing-with-get-pip-py] 
script.

> Thin Client lib: Python
> ---
>
> Key: IGNITE-7782
> URL: https://issues.apache.org/jira/browse/IGNITE-7782
> Project: Ignite
>  Issue Type: New Feature
>  Components: thin client
>Affects Versions: 2.7
>Reporter: Alexey Kosenchuk
>Assignee: Dmitry Melnichuk
>Priority: Major
>  Labels: pull-request-available
> Fix For: 2.7
>
>
> Implement Thin (lightweight) Client lib in Python programming language for 
> Ignite Binary Client Protocol 
> [https://apacheignite.readme.io/docs/binary-client-protocol]
> Prototype:
>  [https://github.com/skozlov-gridgain/apache-ignite-python-thin-client]
> Example - NodeJS client - IGNITE-
>  [https://github.com/nobitlost/ignite/tree/master/modules/platforms/nodejs]
> ---
> h5. Package name (for use with setuptools/PyPI):
> pyignite
> h5. Location of the lib in the repository:
> .../modules/platforms/python
> h5. Python version:
> 3.4+ (tested on 3.4 and 3.6)
> h5. Ignite version:
> 2.7.
> h5. Architecture:
> Syncronous (safe for use with threading/multiprocessing), object-oriented.
> h5. Documentation:
> Sphinx/autodoc + readme.md
> h5. Test framework:
> pytest, pytest-runner for setuptools pytest integration.
> h5. Usage examples included:
> - cache management (creating, configuring, deleting),
> - key-value operations,
> - cache scan,
> - basic SQL queries,
> - simple and advanced work with Complex objects,
> - fail-over connection.
> h5. Goal:
> Create a full-featured Ignite thin client library:
> - carefully implement, test, and document all the features of the binary 
> protocol, that can be useful in Python programs,
> - implement and document features like type IDs or serialization hints, that 
> are mostly useless in Python, for interoperability's sake,
> - skip features, that are not applicable to Python programs, like filter 
> object in scan query.
> h5. Proposed scope of features:
> - basic and SSL-wrapped TCP connection,
> - authentication and authorization,
> - failover mechanism,
> - all datatypes,
> - all client operations (except Binary-Type operations with type names).



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


[jira] [Assigned] (IGNITE-9908) thin python: Can't use client with windows

2018-10-17 Thread Dmitry Melnichuk (JIRA)


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

Dmitry Melnichuk reassigned IGNITE-9908:


Assignee: Dmitry Melnichuk

> thin python: Can't use client with windows
> --
>
> Key: IGNITE-9908
> URL: https://issues.apache.org/jira/browse/IGNITE-9908
> Project: Ignite
>  Issue Type: Bug
>  Components: thin client
>Affects Versions: 2.7
> Environment: Windows 10 1803
> Python 3.7
> Client module installed from latest sources, branch - master 
> Ignite compiled from latest sources
>Reporter: Stepan Pilschikov
>Assignee: Dmitry Melnichuk
>Priority: Major
>
> Trying to use thin python client on Windows and have exception
> Python excetion:
> {code}
> Traceback (most recent call last):
>   File "C:\dev\test\put_value.py", line 5, in 
> cache = client.get_or_create_cache("test_3")
>   File "[ignite path]\platforms\python\pyignite\client.py", line 306, in 
> get_or_create_cache
> return Cache(self, settings, with_get=True)
>   File "[ignite path]\platforms\python\pyignite\cache.py", line 116, in 
> __init__
> result = func(client, settings)
>   File "[ignite path]\platforms\python\pyignite\api\cache_config.py", line 
> 151, in cache_get_or_create
> 'cache_name': name,
>   File "[ignite path]\platforms\python\pyignite\queries\__init__.py", line 
> 287, in perform
> response_ctype, recv_buffer = response_struct.parse(conn)
>   File "[ignite path]\platforms\python\pyignite\queries\__init__.py", line 
> 66, in parse
> buffer = client.recv(ctypes.sizeof(header_class))
>   File "[ignite path]\platforms\python\pyignite\connection\__init__.py", line 
> 292, in recv
> result += self._recv(buffersize-pref_size, flags)
>   File "[ignite path]\platforms\python\pyignite\connection\__init__.py", line 
> 316, in _recv
> raise SocketError('Socket connection broken.')
> OSError: Socket connection broken.
> {code}
> In ignite logs:
> {code}
> [11:19:20,522][SEVERE][client-connector-#47][ClientListenerNioListener] 
> Failed to parse client request.
> class org.apache.ignite.binary.BinaryObjectException: Unexpected field type 
> [pos=10, expected=String, actual=0]
> at 
> org.apache.ignite.internal.binary.BinaryReaderExImpl.checkFlagNoHandles(BinaryReaderExImpl.java:1679)
> at 
> org.apache.ignite.internal.binary.BinaryReaderExImpl.readString(BinaryReaderExImpl.java:1057)
> at 
> org.apache.ignite.internal.processors.platform.client.cache.ClientCacheGetOrCreateWithNameRequest.(ClientCacheGetOrCreateWithNameRequest.java:41)
> at 
> org.apache.ignite.internal.processors.platform.client.ClientMessageParser.decode(ClientMessageParser.java:342)
> at 
> org.apache.ignite.internal.processors.platform.client.ClientMessageParser.decode(ClientMessageParser.java:238)
> at 
> org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:140)
> at 
> org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:45)
> at 
> org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279)
> at 
> org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109)
> at 
> org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97)
> at 
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
> at 
> org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:748)
> {code}
> Python code:
> {code}
> from pyignite import Client
> client = Client()
> client.connect('127.0.0.1', 10800)
> cache = client.get_or_create_cache("test_3")
> cache.put("key3", -3.3)
> {code}
> All others thin clients from same sources and on the same ignite binary works 
> well
> On linux from same sources python client works well too
> Troubles only with python and windows



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


[jira] [Assigned] (IGNITE-9850) Python thin: Find out the cause of the python's client low performance

2018-10-11 Thread Dmitry Melnichuk (JIRA)


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

Dmitry Melnichuk reassigned IGNITE-9850:


Assignee: Dmitry Melnichuk

> Python thin: Find out the cause of the python's client low performance
> --
>
> Key: IGNITE-9850
> URL: https://issues.apache.org/jira/browse/IGNITE-9850
> Project: Ignite
>  Issue Type: Task
>  Components: thin client
>Affects Versions: 2.7
>Reporter: Igor Sapego
>Assignee: Dmitry Melnichuk
>Priority: Critical
>  Labels: python
> Fix For: 2.8
>
>
> According to benchmarks results reported by IGNITE-9824, python thin client 
> is 3 to 4 times slower than Java client. We need to find out the root cause 
> of this and if we can fix it.



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


[jira] [Updated] (IGNITE-7782) Thin Client lib: Python

2018-09-07 Thread Dmitry Melnichuk (JIRA)


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

Dmitry Melnichuk updated IGNITE-7782:
-
Description: 
Implement Thin (lightweight) Client lib in Python programming language for 
Ignite Binary Client Protocol 
[https://apacheignite.readme.io/docs/binary-client-protocol]

Prototype:
 [https://github.com/skozlov-gridgain/apache-ignite-python-thin-client]

Example - NodeJS client - IGNITE-
 [https://github.com/nobitlost/ignite/tree/master/modules/platforms/nodejs]

---

h5. Package name (for use with setuptools/PyPI):
pyignite

h5. Location of the lib in the repository:
.../modules/platforms/python

h5. Python version:
3.4+ (tested on 3.4 and 3.6)

h5. Ignite version:
2.7.

h5. Architecture:
Syncronous (safe for use with threading/multiprocessing), object-oriented.

h5. Documentation:
Sphinx/autodoc + readme.md

h5. Test framework:
pytest, pytest-runner for setuptools pytest integration.

h5. Usage examples included:
- cache management (creating, configuring, deleting),
- key-value operations,
- cache scan,
- basic SQL queries,
- simple and advanced work with Complex objects,
- fail-over connection.

h5. Goal:
Create a full-featured Ignite thin client library:
- carefully implement, test, and document all the features of the binary 
protocol, that can be useful in Python programs,
- implement and document features like type IDs or serialization hints, that 
are mostly useless in Python, for interoperability's sake,
- skip features, that are not applicable to Python programs, like filter object 
in scan query.

h5. Proposed scope of features:
- basic and SSL-wrapped TCP connection,
- authentication and authorization,
- failover mechanism,
- all datatypes,
- all client operations (except Binary-Type operations with type names).

  was:
Implement Thin (lightweight) Client lib in Python programming language for 
Ignite Binary Client Protocol 
[https://apacheignite.readme.io/v2.4/docs/binary-client-protocol]

Prototype:
 [https://github.com/skozlov-gridgain/apache-ignite-python-thin-client]

Example - NodeJS client - IGNITE-
 [https://github.com/nobitlost/ignite/tree/master/modules/platforms/nodejs]

---

h5. Package name (for use with setuptools/PyPI):
pyignite

h5. Location of the lib in the repository:
.../modules/platforms/python

h5. Python version:
3.4+ (tested on 3.4 and 3.6)

h5. Ignite version:
2.7.

h5. Architecture:
Syncronous (safe for use with threading/multiprocessing), object-oriented.

h5. Documentation:
Sphinx/autodoc + readme.md

h5. Test framework:
pytest, pytest-runner for setuptools pytest integration.

h5. Usage examples included:
- cache management (creating, configuring, deleting),
- key-value operations,
- cache scan,
- basic SQL queries,
- simple and advanced work with Complex objects,
- fail-over connection.

h5. Goal:
Create a full-featured Ignite thin client library:
- carefully implement, test, and document all the features of the binary 
protocol, that can be useful in Python programs,
- implement and document features like type IDs or serialization hints, that 
are mostly useless in Python, for interoperability's sake,
- skip features, that are not applicable to Python programs, like filter object 
in scan query.

h5. Proposed scope of features:
- basic and SSL-wrapped TCP connection,
- authentication and authorization,
- failover mechanism,
- all datatypes,
- all client operations (except Binary-Type operations with type names).


> Thin Client lib: Python
> ---
>
> Key: IGNITE-7782
> URL: https://issues.apache.org/jira/browse/IGNITE-7782
> Project: Ignite
>  Issue Type: New Feature
>  Components: thin client
>Affects Versions: 2.7
>Reporter: Alexey Kosenchuk
>Assignee: Dmitry Melnichuk
>Priority: Major
>  Labels: pull-request-available
> Fix For: 2.7
>
>
> Implement Thin (lightweight) Client lib in Python programming language for 
> Ignite Binary Client Protocol 
> [https://apacheignite.readme.io/docs/binary-client-protocol]
> Prototype:
>  [https://github.com/skozlov-gridgain/apache-ignite-python-thin-client]
> Example - NodeJS client - IGNITE-
>  [https://github.com/nobitlost/ignite/tree/master/modules/platforms/nodejs]
> ---
> h5. Package name (for use with setuptools/PyPI):
> pyignite
> h5. Location of the lib in the repository:
> .../modules/platforms/python
> h5. Python version:
> 3.4+ (tested on 3.4 and 3.6)
> h5. Ignite version:
> 2.7.
> h5. Architecture:
> Syncronous (safe for use with threading/multiprocessing), object-oriented.
> h5. Documentation:
> Sphinx/autodoc + readme.md
> h5. Test framework:
> pytest, pytest-runner for setuptools pytest integration.
> h5. Usage examples 

[jira] [Updated] (IGNITE-7782) Thin Client lib: Python

2018-08-31 Thread Dmitry Melnichuk (JIRA)


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

Dmitry Melnichuk updated IGNITE-7782:
-
Description: 
Implement Thin (lightweight) Client lib in Python programming language for 
Ignite Binary Client Protocol 
[https://apacheignite.readme.io/v2.4/docs/binary-client-protocol]

Prototype:
 [https://github.com/skozlov-gridgain/apache-ignite-python-thin-client]

Example - NodeJS client - IGNITE-
 [https://github.com/nobitlost/ignite/tree/master/modules/platforms/nodejs]

---

h5. Package name (for use with setuptools/PyPI):
pyignite

h5. Location of the lib in the repository:
.../modules/platforms/python

h5. Python version:
3.4+ (tested on 3.4 and 3.6)

h5. Ignite version:
2.7.

h5. Architecture:
Syncronous (safe for use with threading/multiprocessing), object-oriented.

h5. Documentation:
Sphinx/autodoc + readme.md

h5. Test framework:
pytest, pytest-runner for setuptools pytest integration.

h5. Usage examples included:
- cache management (creating, configuring, deleting),
- key-value operations,
- cache scan,
- basic SQL queries,
- simple and advanced work with Complex objects,
- fail-over connection.

h5. Goal:
Create a full-featured Ignite thin client library:
- carefully implement, test, and document all the features of the binary 
protocol, that can be useful in Python programs,
- implement and document features like type IDs or serialization hints, that 
are mostly useless in Python, for interoperability's sake,
- skip features, that are not applicable to Python programs, like filter object 
in scan query.

h5. Proposed scope of features:
- basic and SSL-wrapped TCP connection,
- authentication and authorization,
- failover mechanism,
- all datatypes,
- all client operations (except Binary-Type operations with type names).

  was:
Implement Thin (lightweight) Client lib in Python programming language for 
Ignite Binary Client Protocol 
[https://apacheignite.readme.io/v2.4/docs/binary-client-protocol]

Prototype:
 [https://github.com/skozlov-gridgain/apache-ignite-python-thin-client]

Example - NodeJS client - IGNITE-
 [https://github.com/nobitlost/ignite/tree/master/modules/platforms/nodejs]

---

h5. Package name (for use with setuptools/PyPI):
pyignite

h5. Location of the lib in the repository:
.../modules/platforms/python

h5. Python version:
3.4+ (tested on 3.4 and 3.6)

h5. Ignite version:
2.5.

h5. Architecture:
Syncronous (safe for use with threading/multiprocessing), procedural. Ignite 
operations are mapped to functions.

h5. Documentation:
Sphinx/autodoc + readme.md

h5. Test framework:
pytest, pytest-runner for setuptools pytest integration.

h5. Usage examples included:
- cache operations (creating, configuring, deleting),
- key-value operations,
- scan query,
- basic SQL queries.

h5. Goal:
Create a full-featured Ignite thin client library:
- carefully implement, test, and document all the features of the binary 
protocol, that can be useful in Python programs,
- implement and document features like type IDs or serialization hints, that 
are mostly useless in Python, for interoperability's sake,
- skip features, that are not applicable to Python programs, like filter object 
in scan query.

h5. Proposed scope of features:
- basic and SSL-wrapped TCP connection,
- authentication and authorization,
- failover mechanism,
- all datatypes,
- all client operations (except Binary-Type operations with type names).


> Thin Client lib: Python
> ---
>
> Key: IGNITE-7782
> URL: https://issues.apache.org/jira/browse/IGNITE-7782
> Project: Ignite
>  Issue Type: New Feature
>  Components: thin client
>Reporter: Alexey Kosenchuk
>Assignee: Dmitry Melnichuk
>Priority: Major
> Fix For: 2.7
>
>
> Implement Thin (lightweight) Client lib in Python programming language for 
> Ignite Binary Client Protocol 
> [https://apacheignite.readme.io/v2.4/docs/binary-client-protocol]
> Prototype:
>  [https://github.com/skozlov-gridgain/apache-ignite-python-thin-client]
> Example - NodeJS client - IGNITE-
>  [https://github.com/nobitlost/ignite/tree/master/modules/platforms/nodejs]
> ---
> h5. Package name (for use with setuptools/PyPI):
> pyignite
> h5. Location of the lib in the repository:
> .../modules/platforms/python
> h5. Python version:
> 3.4+ (tested on 3.4 and 3.6)
> h5. Ignite version:
> 2.7.
> h5. Architecture:
> Syncronous (safe for use with threading/multiprocessing), object-oriented.
> h5. Documentation:
> Sphinx/autodoc + readme.md
> h5. Test framework:
> pytest, pytest-runner for setuptools pytest integration.
> h5. Usage examples included:
> - cache management (creating, configuring, deleting),
> - key-value operations,
> - 

[jira] [Updated] (IGNITE-7782) Thin Client lib: Python

2018-06-29 Thread Dmitry Melnichuk (JIRA)


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

Dmitry Melnichuk updated IGNITE-7782:
-
Description: 
Implement Thin (lightweight) Client lib in Python programming language for 
Ignite Binary Client Protocol 
[https://apacheignite.readme.io/v2.4/docs/binary-client-protocol]

Prototype:
 [https://github.com/skozlov-gridgain/apache-ignite-python-thin-client]

Example - NodeJS client - IGNITE-
 [https://github.com/nobitlost/ignite/tree/master/modules/platforms/nodejs]

---

h5. Package name (for use with setuptools/PyPI):
pyignite

h5. Location of the lib in the repository:
.../modules/platforms/python

h5. Python version:
3.4+ (tested on 3.4 and 3.6)

h5. Ignite version:
2.5.

h5. Architecture:
Syncronous (safe for use with threading/multiprocessing), procedural. Ignite 
operations are mapped to functions.

h5. Documentation:
Sphinx/autodoc + readme.md

h5. Test framework:
pytest, pytest-runner for setuptools pytest integration.

h5. Usage examples included:
- cache operations (creating, configuring, deleting),
- key-value operations,
- scan query,
- basic SQL queries.

h5. Goal:
Create a full-featured Ignite thin client library:
- carefully implement, test, and document all the features of the binary 
protocol, that can be useful in Python programs,
- implement and document features like type IDs or serialization hints, that 
are mostly useless in Python, for interoperability's sake,
- skip features, that are not applicable to Python programs, like filter object 
in scan query.

h5. Proposed scope of features:
- basic and SSL-wrapped TCP connection,
- authentication and authorization,
- failover mechanism,
- all datatypes,
- all client operations (except Binary-Type operations with type names).

  was:
Implement Thin (lightweight) Client lib in Python programming language for 
Ignite Binary Client Protocol 
[https://apacheignite.readme.io/v2.4/docs/binary-client-protocol]

Prototype:
 [https://github.com/skozlov-gridgain/apache-ignite-python-thin-client]

Example - NodeJS client - IGNITE-
 [https://github.com/nobitlost/ignite/tree/master/modules/platforms/nodejs]

---

h5. Package name (for use with setuptools/PyPI):
pyignite

h5. Location of the lib in the repository:
.../modules/platforms/python

h5. Python version:
3.4+ (tested on 3.4 and 3.6)

h5. Ignite version:
2.5.

h5. Architecture:
Syncronous (safe for use with threading/multiprocessing), procedural. Ignite 
operations are mapped to functions.

h5. Documentation:
Sphinx/autodoc + readme.md

h5. Test framework:
pytest, pytest-runner for setuptools pytest integration.

h5. Usage examples included:
- cache operations (creating, configuring, deleting),
- key-value operations,
- scan query,
- basic SQL queries.

h5. Goal:
Create a full-featured Ignite thin client library:
- carefully implement, test, and document all the features of the binary 
protocol, that can be useful in Python programs,
- implement and document features like ty-1pe IDs or serialization hints, that 
are mostly useless in Python, for interoperability's sake,
- skip features, that are not applicable to Python programs, like filter object 
in scan query.

h5. Proposed scope of features:
- basic and SSL-wrapped TCP connection,
- authentication and authorization,
- failover mechanism,
- all datatypes,
- all client operations (except Binary-Type operations with type names).


> Thin Client lib: Python
> ---
>
> Key: IGNITE-7782
> URL: https://issues.apache.org/jira/browse/IGNITE-7782
> Project: Ignite
>  Issue Type: New Feature
>  Components: thin client
>Reporter: Alexey Kosenchuk
>Assignee: Dmitry Melnichuk
>Priority: Major
>
> Implement Thin (lightweight) Client lib in Python programming language for 
> Ignite Binary Client Protocol 
> [https://apacheignite.readme.io/v2.4/docs/binary-client-protocol]
> Prototype:
>  [https://github.com/skozlov-gridgain/apache-ignite-python-thin-client]
> Example - NodeJS client - IGNITE-
>  [https://github.com/nobitlost/ignite/tree/master/modules/platforms/nodejs]
> ---
> h5. Package name (for use with setuptools/PyPI):
> pyignite
> h5. Location of the lib in the repository:
> .../modules/platforms/python
> h5. Python version:
> 3.4+ (tested on 3.4 and 3.6)
> h5. Ignite version:
> 2.5.
> h5. Architecture:
> Syncronous (safe for use with threading/multiprocessing), procedural. Ignite 
> operations are mapped to functions.
> h5. Documentation:
> Sphinx/autodoc + readme.md
> h5. Test framework:
> pytest, pytest-runner for setuptools pytest integration.
> h5. Usage examples included:
> - cache operations (creating, configuring, deleting),
> - key-value operations,
> - scan query,
> - basic 

[jira] [Updated] (IGNITE-7782) Thin Client lib: Python

2018-06-29 Thread Dmitry Melnichuk (JIRA)


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

Dmitry Melnichuk updated IGNITE-7782:
-
Description: 
Implement Thin (lightweight) Client lib in Python programming language for 
Ignite Binary Client Protocol 
[https://apacheignite.readme.io/v2.4/docs/binary-client-protocol]

Prototype:
 [https://github.com/skozlov-gridgain/apache-ignite-python-thin-client]

Example - NodeJS client - IGNITE-
 [https://github.com/nobitlost/ignite/tree/master/modules/platforms/nodejs]

---

h5. Package name (for use with setuptools/PyPI):
pyignite

h5. Location of the lib in the repository:
.../modules/platforms/python

h5. Python version:
3.4+ (tested on 3.4 and 3.6)

h5. Ignite version:
2.5.

h5. Architecture:
Syncronous (safe for use with threading/multiprocessing), procedural. Ignite 
operations are mapped to functions.

h5. Documentation:
Sphinx/autodoc + readme.md

h5. Test framework:
pytest, pytest-runner for setuptools pytest integration.

h5. Usage examples included:
- cache operations (creating, configuring, deleting),
- key-value operations,
- scan query,
- basic SQL queries.

h5. Goal:
Create a full-featured Ignite thin client library:
- carefully implement, test, and document all the features of the binary 
protocol, that can be useful in Python programs,
- implement and document features like ty-1pe IDs or serialization hints, that 
are mostly useless in Python, for interoperability's sake,
- skip features, that are not applicable to Python programs, like filter object 
in scan query.

h5. Proposed scope of features:
- basic and SSL-wrapped TCP connection,
- authentication and authorization,
- failover mechanism,
- all datatypes,
- all client operations (except Binary-Type operations with type names).

  was:
Implement Thin (lightweight) Client lib in Python programming language for 
Ignite Binary Client Protocol 
[https://apacheignite.readme.io/v2.4/docs/binary-client-protocol]

Prototype:
 [https://github.com/skozlov-gridgain/apache-ignite-python-thin-client]

Example - NodeJS client - IGNITE-
 [https://github.com/nobitlost/ignite/tree/master/modules/platforms/nodejs]

---

Location of the lib:
 .../modules/platforms/python

Python version:
 3.4+

Spec autogeneration:
 Sphinx + Autodoc

Test framework:
 pytest, pytest-runner for setuptools pytest integration


> Thin Client lib: Python
> ---
>
> Key: IGNITE-7782
> URL: https://issues.apache.org/jira/browse/IGNITE-7782
> Project: Ignite
>  Issue Type: New Feature
>  Components: thin client
>Reporter: Alexey Kosenchuk
>Assignee: Dmitry Melnichuk
>Priority: Major
>
> Implement Thin (lightweight) Client lib in Python programming language for 
> Ignite Binary Client Protocol 
> [https://apacheignite.readme.io/v2.4/docs/binary-client-protocol]
> Prototype:
>  [https://github.com/skozlov-gridgain/apache-ignite-python-thin-client]
> Example - NodeJS client - IGNITE-
>  [https://github.com/nobitlost/ignite/tree/master/modules/platforms/nodejs]
> ---
> h5. Package name (for use with setuptools/PyPI):
> pyignite
> h5. Location of the lib in the repository:
> .../modules/platforms/python
> h5. Python version:
> 3.4+ (tested on 3.4 and 3.6)
> h5. Ignite version:
> 2.5.
> h5. Architecture:
> Syncronous (safe for use with threading/multiprocessing), procedural. Ignite 
> operations are mapped to functions.
> h5. Documentation:
> Sphinx/autodoc + readme.md
> h5. Test framework:
> pytest, pytest-runner for setuptools pytest integration.
> h5. Usage examples included:
> - cache operations (creating, configuring, deleting),
> - key-value operations,
> - scan query,
> - basic SQL queries.
> h5. Goal:
> Create a full-featured Ignite thin client library:
> - carefully implement, test, and document all the features of the binary 
> protocol, that can be useful in Python programs,
> - implement and document features like ty-1pe IDs or serialization hints, 
> that are mostly useless in Python, for interoperability's sake,
> - skip features, that are not applicable to Python programs, like filter 
> object in scan query.
> h5. Proposed scope of features:
> - basic and SSL-wrapped TCP connection,
> - authentication and authorization,
> - failover mechanism,
> - all datatypes,
> - all client operations (except Binary-Type operations with type names).



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


[jira] [Updated] (IGNITE-7782) Thin Client lib: Python

2018-06-29 Thread Dmitry Melnichuk (JIRA)


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

Dmitry Melnichuk updated IGNITE-7782:
-
Description: 
Implement Thin (lightweight) Client lib in Python programming language for 
Ignite Binary Client Protocol 
[https://apacheignite.readme.io/v2.4/docs/binary-client-protocol]

Prototype:
 [https://github.com/skozlov-gridgain/apache-ignite-python-thin-client]

Example - NodeJS client - IGNITE-
 [https://github.com/nobitlost/ignite/tree/master/modules/platforms/nodejs]

---

Location of the lib:
 .../modules/platforms/python

Python version:
 3.4+

Spec autogeneration:
 Sphinx + Autodoc

Test framework:
 pytest, pytest-runner for setuptools pytest integration

  was:
Implement Thin (lightweight) Client lib in Python programming language for 
Ignite Binary Client Protocol 
https://apacheignite.readme.io/v2.4/docs/binary-client-protocol

Prototype:
https://github.com/skozlov-gridgain/apache-ignite-python-thin-client

Example - NodeJS client - IGNITE-
https://github.com/nobitlost/ignite/tree/master/modules/platforms/nodejs

---

Location of the lib:
.../modules/platforms/python

Python version:
3.4+

Spec autogeneration:
Sphinx + Autodoc + Readthedocs

Test framework:
pytest




> Thin Client lib: Python
> ---
>
> Key: IGNITE-7782
> URL: https://issues.apache.org/jira/browse/IGNITE-7782
> Project: Ignite
>  Issue Type: New Feature
>  Components: thin client
>Reporter: Alexey Kosenchuk
>Assignee: Dmitry Melnichuk
>Priority: Major
>
> Implement Thin (lightweight) Client lib in Python programming language for 
> Ignite Binary Client Protocol 
> [https://apacheignite.readme.io/v2.4/docs/binary-client-protocol]
> Prototype:
>  [https://github.com/skozlov-gridgain/apache-ignite-python-thin-client]
> Example - NodeJS client - IGNITE-
>  [https://github.com/nobitlost/ignite/tree/master/modules/platforms/nodejs]
> ---
> Location of the lib:
>  .../modules/platforms/python
> Python version:
>  3.4+
> Spec autogeneration:
>  Sphinx + Autodoc
> Test framework:
>  pytest, pytest-runner for setuptools pytest integration



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