Packages

c

org.apache.spark.storage

RandomBlockReplicationPolicy

class RandomBlockReplicationPolicy extends BlockReplicationPolicy with Logging

Developer API
Annotations
@DeveloperApi()
Source
BlockReplicationPolicy.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RandomBlockReplicationPolicy
  2. Logging
  3. BlockReplicationPolicy
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RandomBlockReplicationPolicy()

Value Members

  1. def prioritize(blockManagerId: BlockManagerId, peers: Seq[BlockManagerId], peersReplicatedTo: HashSet[BlockManagerId], blockId: BlockId, numReplicas: Int): List[BlockManagerId]

    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

    blockManagerId

    Id of the current BlockManager for self identification

    peers

    A list of peers of a BlockManager

    peersReplicatedTo

    Set of peers already replicated to

    blockId

    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

    returns

    A prioritized list of peers. Lower the index of a peer, higher its priority

    Definition Classes
    RandomBlockReplicationPolicyBlockReplicationPolicy