Packages

o

org.apache.spark.storage

BlockReplicationUtils

object BlockReplicationUtils

Source
BlockReplicationPolicy.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BlockReplicationUtils
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def getRandomSample[T](elems: Seq[T], m: Int, r: Random): List[T]

    Get a random sample of size m from the elems

    Get a random sample of size m from the elems

    m

    number of samples needed

    r

    random number generator

    returns

    a random list of size m. If there are fewer than m elements in elems, we just randomly shuffle elems