Class AssignmentCreator<T extends CompleteWork>

java.lang.Object
org.apache.drill.exec.store.schedule.AssignmentCreator<T>

public class AssignmentCreator<T extends CompleteWork> extends Object
Responsible for assigning a set of work units to the available slices.
  • Method Details

    • getMappings

      public static <T extends CompleteWork> org.apache.drill.shaded.guava.com.google.common.collect.ListMultimap<Integer,T> getMappings(List<CoordinationProtos.DrillbitEndpoint> incomingEndpoints, List<T> units)
      Assign each unit of work to a minor fragment, given that a list of DrillbitEndpoints, whose index in the list correspond to the minor fragment id for each fragment. A given DrillbitEndpoint can appear multiple times in this list. This method will try to assign work based on the affinity of each work unit, but will also evenly distribute the work units among all of the minor fragments
      Parameters:
      incomingEndpoints - The list of incomingEndpoints, indexed by minor fragment id
      units - the list of work units to be assigned
      Returns:
      A multimap that maps each minor fragment id to a list of work units