Hi Calvin,

BinaryMarshaller can solve that issue with involving a few more. 
First of all, you will need to disable compact footer to let each
BinaryObject has it's schema in footer.

If you need just put/get POJOs everything will be fine. But you need to
enlist your POJO in BinaryConfiguration [1], because Ignite identifies type
with typeId, that is by default hash from full class name. So each
BinaryObject keeps only typeId. To find proper class to which it should be
deserialized, Ignite needs mapping class name -> typeId. This mapping keeps
in marshaller cache that holds in memory and in local files. Anyway you can
stop grid, remove Ignite files and ran into issue that you cannot
deserialize object, because Ignite cannot find class name for some typeId.
And as I said, you need to enlist this class in BinaryConfiguration, that
Ignite will read on start and fill marshaller cache.

Second case, if you by some reason want to use BinaryObject directly. You
should be aware that fact you can read and add fields, but you will not be
able to enlist them. Because here used the same approach: field name
converts to fieldId. Mapping fieldName -> fieldId is called meta info and
stored in local meta cache. Again, hopefully, you can solve this with
BinaryConfiguration.

In summary, BinaryMarshaller is OK with different schema, but you need
disable compact footer and add your POJOs in BinaryConfiguration.

[1]
https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/configuration/BinaryConfiguration.html

Thanks!
-Dmitry



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to