private int hashIndex(byte key) {
        // The array lengths are always a power of two, so we can use a bitmask to stay inside the array bounds.
        return hashCode(key) & mask;
    }
Returns the hashed index for the given key.
jraft-rheakv/rheakv-core/src/main/java/com/alipay/sofa/jraft/rhea/util/ByteObjectHashMap.java