You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by adzyuba <dr...@yandex.ru> on 2017/07/12 22:19:53 UTC
Fields order in binary object.
Hello.
I have some problem with two same BinaryObject. If i reorder to set fields
in BinaryObject with same fields names and fields values, then i get two
different BinaryObject with different hash codes. So if i use BinaryObject
as a key for cache this make some trouble to extract value from cache by
this key.
There is the test example:
https://github.com/bk20186/test.git <https://github.com/bk20186/test.git>
Sincerely, Andrew Dzyuba.
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Fields-order-in-binary-object-tp14723.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Fields order in binary object.
Posted by adzyuba <dr...@yandex.ru>.
Ok, i see it works. But i found in Ignite 2.0 code this note:
/**
* When set to {@code true} fields are written by BinaryMarshaller in
sorted order. Otherwise
* the natural order is used.
* <p>
* @deprecated Should be removed in Apache Ignite 2.0.
*/
@Deprecated
public static final String IGNITE_BINARY_SORT_OBJECT_FIELDS =
"IGNITE_BINARY_SORT_OBJECT_FIELDS";
Will u have any other suggestion later?
And how affect this flag on speed performance?
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Fields-order-in-binary-object-tp14723p14890.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.
Re: Fields order in binary object.
Posted by dkarachentsev <dk...@gridgain.com>.
Hi,
It seems Ignite doesn't sort fields for binary objects by default. Use
IGNITE_BINARY_SORT_OBJECT_FIELDS system property:
-DIGNITE_BINARY_SORT_OBJECT_FIELDS=true
or
System.setProperty("IGNITE_BINARY_SORT_OBJECT_FIELDS", "true");
Thanks!
-Dmitry
--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Fields-order-in-binary-object-tp14723p14867.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.