public class RandomBlockReplicationPolicy extends Object implements BlockReplicationPolicy
Constructor and Description |
---|
RandomBlockReplicationPolicy() |
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.
|
public scala.collection.immutable.List<BlockManagerId> prioritize(BlockManagerId blockManagerId, scala.collection.Seq<BlockManagerId> peers, scala.collection.mutable.HashSet<BlockManagerId> peersReplicatedTo, BlockId blockId, int numReplicas)
prioritize
in interface BlockReplicationPolicy
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
- (undocumented)