Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 750 Bytes

partitioning.md

File metadata and controls

32 lines (26 loc) · 750 Bytes

Partitioning

Important Interfaces

  • Paritioner - How to partition state.
  Collection<Partition<T>> definePartitions(Collection<Partition<T>> partitions, PartitioningContext context);
  void partitioned(Map<Integer, Partition<T>> partitions);
  • StatsListener - When to trigger partition.
  Response processStats(BatchedOperatorStats stats);
  • StreamCodec - How data is distributed.
  Object fromByteArray(Slice fragment);
  Slice toByteArray(T o);
  int getPartition(T o);
  • PartitionKeys - What each partition accepts.
  public final int mask;
  public final Set<Integer> partitions;
  • Unifier - How to combine output results from multiple partitions.
  void process(T tuple);