Hello! Then you need to implement your own AffinityFunction by subclassing RendezvousAffinityFunction.
Regards, -- Ilya Kasnacheev вт, 13 окт. 2020 г. в 13:15, ssansoy <[email protected]>: > Hi, > RE: the custom affinity function, this is what we have: > > public class CacheLevelAffinityKeyMapper implements AffinityKeyMapper { > > private final Logger LOGGER = > LoggerFactory.getLogger(CacheLevelAffinityKeyMapper.class); > @Override > public Object affinityKey(Object key) { > if(key instanceof BinaryObject){ > BinaryObject binaryObjectKey = (BinaryObject) key; > BinaryType binaryType = binaryObjectKey.type(); > LOGGER.trace("Key is {}, binary type is {}", key, > binaryType.typeName()); > return binaryType.typeName(); > } > else{ > LOGGER.trace("Key is {}, type is {}", key, key.getClass()); > return key; > } > } > > The issue was that the interface AffinityKeyMapper is depricated in Ignite > 2.8.1. Is this the way you would recommend supplying such a custom > function? > We can't use the @AffinityKeyMapped annotation because there is no java > type > to annotate as such (we use BinaryObjects only) > > > > -- > Sent from: http://apache-ignite-users.70518.x6.nabble.com/ >
