ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dkarachentsev <dkarachent...@gridgain.com>
Subject Re: Ignite Affinity & Binary Configuration Issues
Date Thu, 13 Apr 2017 08:44:44 GMT
Hi Addo,

There is no need to explicitly specify IdentityResolver. On marshaling step,
hash code is got from object and recorded in BinaryObject, and it will be
used for any affinity mapping, e.g. affinity run. Use IdentityResolver if
you need customize hash code calculation, f.e. exclude some fields or in
case of using BinaryObjectBuilder. So you may remove custom
BinaryConfiguration.

Ignite tries to avoid redundant serialization/deserialization, and for
proper work there is no need to do it. According to this rule Ignite passes
BinaryObject in AffinityKeyMapper. You don't need to deserialize the whole
object, it's enough to read just required field: 

if (CacheKeyOne.class.getName().equals(bo.type().typeName()))
    return bo.field("key");

You should avoid using other marshalers, because BinaryMarshaller is highly
optimized for use in Ignite.

-Dmitry.




--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Ignite-Affinity-Binary-Configuration-Issues-tp11897p11933.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Mime
View raw message