class HashRing
def get_node_pos(key)
def get_node_pos(key) return [nil,nil] if @ring.size == 0 crc = Zlib.crc32(key) idx = HashRing.binary_search(@sorted_keys, crc) return [@ring[@sorted_keys[idx]], idx] end
def get_node_pos(key) return [nil,nil] if @ring.size == 0 crc = Zlib.crc32(key) idx = HashRing.binary_search(@sorted_keys, crc) return [@ring[@sorted_keys[idx]], idx] end