Class AssignmentCreator<T extends CompleteWork>
java.lang.Object
org.apache.drill.exec.store.schedule.AssignmentCreator<T>
Responsible for assigning a set of work units to the available slices.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <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.
-
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 idunits
- the list of work units to be assigned- Returns:
- A multimap that maps each minor fragment id to a list of work units
-