The client designed for the new client binary protocol introduced in Apache Ignite 2.4 https://cwiki.apache.org/confluence/display/IGNITE/IEP-9+Thin+Client+Protocol
No. The python client supports only limited set of cache operations, namely:
cache_put
,cache_put_all
,cache_get
,cache_get_all
,cache_remove_key
,
cache_clear_key
,cache_contains_key
,cache_contains_keys
,
cache_remove_all
,cache_clear
,cache_create_with_name
,cache_destroy
scan_query
from ignite import ThinClient, ThinClientException
thin_client = ThinClient()
try:
thin_client.connect()
thin_client.cache_put('mycache', 1, 'value 1')
value = thin_client.cache_get('mycache', 1)
print(value)
except ThinClientException as e:
print(str(e))
raise e
There's no documentation yet due to the implementation as a prototype.
The tests in tests
directory can be used as the code samples.
The client supports all python types except set
but including list
and dictionary
.
Partially yes with following limitations:
-
A complex java class will be converted into a python dictionary for
cache_get
operations. -
A python dictionary will be converted into Java
HashMap
forcache_put
operations. -
A python class not supported
-
Using some primitive java data types like
int
,short
requireskey_type
andvalue_type
in**kwargs
forcache_put
operations
Requirements:
- Nose test framework
- Apache Ignite 2.4+ installation.
Run Ignite cluster:
- Start Apache Ignite node(s) with test configuration file:
$IGNITE_HOME/bin/ignite.sh tests/test.xml
- Start regular tests
nosetests -v tests/test_thin_client.py
Run Ignite cluster:
- Start Apache Ignite node(s) with test configuration file:
$IGNITE_HOME/bin/ignite.sh tests/test_auth.xml
- Activate cluster
$IGNITE_HOME/bin/control.sh --user ignite --password ignite --activate
- Start authentication tests
nosetests -v tests/test_thin_client_auth.py
Apache Ignite Python Thin Client distributed under Apache License 2.0