public class BasicBlockReplicationPolicy extends Object implements BlockReplicationPolicy, Logging
| Constructor and Description |
|---|
BasicBlockReplicationPolicy() |
| 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 manager.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitializeLogging, initializeLogIfNecessary, initializeLogIfNecessary, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarningpublic 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 BlockReplicationPolicyblockManagerId - 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 to