Packages

c

org.apache.spark

HashPartitioner

class HashPartitioner extends Partitioner

A org.apache.spark.Partitioner that implements hash-based partitioning using Java's Object.hashCode.

Java arrays have hashCodes that are based on the arrays' identities rather than their contents, so attempting to partition an RDD[Array[_]] or RDD[(Array[_], _)] using a HashPartitioner will produce an unexpected or incorrect result.

Source
Partitioner.scala
Linear Supertypes
Partitioner, Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HashPartitioner
  2. Partitioner
  3. Serializable
  4. Serializable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HashPartitioner(partitions: Int)

Value Members

  1. def equals(other: Any): Boolean
    Definition Classes
    HashPartitioner → AnyRef → Any
  2. def getPartition(key: Any): Int
    Definition Classes
    HashPartitionerPartitioner
  3. def hashCode(): Int
    Definition Classes
    HashPartitioner → AnyRef → Any
  4. def numPartitions: Int
    Definition Classes
    HashPartitionerPartitioner