public class RandomBlockReplicationPolicy extends Object implements BlockReplicationPolicy, org.apache.spark.internal.Logging
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.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
$init$, initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, initLock, isTraceEnabled, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning, org$apache$spark$internal$Logging$$log__$eq, org$apache$spark$internal$Logging$$log_, uninitialize
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
- Number of peers we need to replicate to