use of org.apache.ignite.internal.processors.igfs.IgfsBaseBlockKey in project ignite by apache.
the class IgfsGroupDataBlocksKeyMapper method affinityKey.
/** {@inheritDoc} */
@Override
public Object affinityKey(Object key) {
if (key instanceof IgfsBaseBlockKey) {
IgfsBaseBlockKey blockKey = (IgfsBaseBlockKey) key;
IgniteUuid affKey = blockKey.affinityKey();
if (affKey != null)
return affKey;
long grpId = blockKey.blockId() / grpSize;
return blockKey.fileHash() + (int) (grpId ^ (grpId >>> 32));
}
return super.affinityKey(key);
}
Aggregations