com.linkedin.d2.discovery.event.PropertyEventThread.PropertyEvent
Contains the result of KeyMapper.mapKeysV3. This data object can compute the mapping of hosts to keys for a particular "iteration" Example use case: We have 2 keys 1 and 2. Let's say for key 1, there are host 1,2,3. and for key 2 there is only host 4. Let's say the user wants 2 hosts per key. Then this object will contain the following mapping { list: - [key 1], [host1, host2] - [key 2], [host4] } when the user calls getFirstResult(), this indicates the user wants to know the mapping of the first "iteration". So we return: { - [key1], [host1] - [key2], [host4] } when the user calls getResult(1), this indicates the user wants to know the mapping of the second "iteration". So we return the following { - [key1] , [host2] - [key2] is unmapped } ------------------------ It's possible that the same host appears twice depending on how the cluster is being partitioned. For example We have keys 1,2,3. keys 1 is served by host 1,2 keys 2 is served by host 2,3 keys 3 is served by host 1,3 we want to get 2 hosts per key because we want to try a backup retry We provide a method in HostToKeyMapper to "combine" the result depending on which "iteration" are you on So for the first try we will return { list: - [key1, key3], [host 1] - [key2]. [host2] } for the 2nd try we will return { list: - [key1], [host2] - [key2, key3]. [host3] } Note that host2 appears twice and it appears on different key depending on which try you're on.
@author Oby Sumampouw (osumampouw@linkedin.com)