Any advice on ignite/java/python interoperability?
From: Benjamin McCord <[email protected]>
Sent: Tuesday, January 29, 2019 4:31 PM
To: Scott Cote <[email protected]>
Subject: Python/Java Ignite Compatibility
I have an issue using a cache to share data between a python and Java
application. My Java application defines a POJO called "Image" which is
placed on my ignite cache using the thin client. My assumption was that the
pyignite thin client would be able to get that object as either a generic type
or I could define my own complex type that mirrors my POJO. When I attempted
to get the object I got an exception: ParseError('Binary type is not
registered'). It appears that pyignite was attempting to query the binary type
but its schema was an empty list so it did nothing with the definition (I
determined this by looking at "pyignite.client._sync_binary_registry"). I
tried this both with and without registering my python type using
"client.register_binary_type". I tried issuing a "put_binary_type" command as
well, but that causes issues with the class definition since the name is a
fully qualified Java class name. Eventually I got it to work by manually
modifying the _registry lookup in the pyignite client to point to my type. It
looked something like
"client._registry[entity_id('my.fully.qualified.class.Image')][schema_id(my_schema)]
= Image". This seems to be working, but it doesn't seem like the most ideal
way of doing things. Is there a better way to do this?