public interface BlockReplicationPolicy
Modifier and Type | Method and Description |
---|---|
scala.collection.immutable.List<BlockManagerId> |
prioritize(BlockManagerId blockManagerId,
scala.collection.Seq<BlockManagerId> peers,
scala.collection.mutable.HashSet<BlockManagerId> peersReplicatedTo,
BlockId blockId,
int numReplicas)
Method to prioritize a bunch of candidate peers of a block
|
scala.collection.immutable.List<BlockManagerId> prioritize(BlockManagerId blockManagerId, scala.collection.Seq<BlockManagerId> peers, scala.collection.mutable.HashSet<BlockManagerId> peersReplicatedTo, BlockId blockId, int numReplicas)
blockManagerId
- Id of the current BlockManager for self identificationpeers
- A list of peers of a BlockManagerpeersReplicatedTo
- Set of peers already replicated toblockId
- BlockId of the block being replicated. This can be used as a source of
randomness if needed.numReplicas
- Number of peers we need to replicate tonumPeersToReplicateTo
.