Method to prioritize a bunch of candidate peers of a block.
Method to prioritize a bunch of candidate peers of a block. This is a basic implementation, that just makes sure we put blocks on different hosts, if possible
Id of the current BlockManager for self identification
A list of peers of a BlockManager
Set of peers already replicated to
BlockId of the block being replicated. This can be used as a source of randomness if needed.
Number of peers we need to replicate to
A prioritized list of peers. Lower the index of a peer, higher its priority