Class VeniceSparkPartitioner

java.lang.Object
org.apache.spark.Partitioner
com.linkedin.venice.spark.datawriter.partition.VeniceSparkPartitioner
All Implemented Interfaces:
Serializable, scala.Serializable

public class VeniceSparkPartitioner extends org.apache.spark.Partitioner
VeniceSparkPartitioner will use the exact same partitioner as the one that will be used inside VeniceWriter (e.g. DefaultVenicePartitioner) to make sure the messages inside each partition belong to the same PubSub topic partition.
See Also:
  • Constructor Details

    • VeniceSparkPartitioner

      public VeniceSparkPartitioner(org.apache.spark.broadcast.Broadcast<Properties> broadcastProperties, int numPartitions)
  • Method Details

    • numPartitions

      public int numPartitions()
      Specified by:
      numPartitions in class org.apache.spark.Partitioner
    • getPartition

      public int getPartition(Object key)
      Specified by:
      getPartition in class org.apache.spark.Partitioner