public abstract class SimpleParallelizer extends Object implements QueryParallelizer
Modifier and Type | Class and Description |
---|---|
protected static class |
SimpleParallelizer.CountRequiredFragments
Designed to setup initial values for arriving fragment accounting.
|
Modifier | Constructor and Description |
---|---|
protected |
SimpleParallelizer(long parallelizationThreshold,
int maxWidthPerNode,
int maxGlobalWidth,
double affinityFactor) |
protected |
SimpleParallelizer(QueryContext context) |
protected SimpleParallelizer(QueryContext context)
protected SimpleParallelizer(long parallelizationThreshold, int maxWidthPerNode, int maxGlobalWidth, double affinityFactor)
public long getSliceTarget()
getSliceTarget
in interface ParallelizationParameters
public int getMaxWidthPerNode()
getMaxWidthPerNode
in interface ParallelizationParameters
public int getMaxGlobalWidth()
getMaxGlobalWidth
in interface ParallelizationParameters
public double getAffinityFactor()
getAffinityFactor
in interface ParallelizationParameters
public Set<Wrapper> getRootFragments(PlanningSet planningSet)
public PlanningSet prepareFragmentTree(Fragment rootFragment)
public void collectStatsAndParallelizeFragments(PlanningSet planningSet, Set<Wrapper> roots, Collection<CoordinationProtos.DrillbitEndpoint> activeEndpoints) throws PhysicalOperatorSetupException
planningSet
- Set of all major fragments and their context.roots
- Root nodes of the plan.activeEndpoints
- currently active drillbit endpoints.PhysicalOperatorSetupException
public abstract void adjustMemory(PlanningSet planningSet, Set<Wrapper> roots, Collection<CoordinationProtos.DrillbitEndpoint> activeEndpoints) throws PhysicalOperatorSetupException
PhysicalOperatorSetupException
public final QueryWorkUnit generateWorkUnit(OptionList options, CoordinationProtos.DrillbitEndpoint foremanNode, UserBitShared.QueryId queryId, Collection<CoordinationProtos.DrillbitEndpoint> activeEndpoints, Fragment rootFragment, UserSession session, BitControl.QueryContextInformation queryContextInfo) throws ExecutionSetupException
generateWorkUnit
in interface QueryParallelizer
options
- List of options set by the user.foremanNode
- foreman node for this query plan.queryId
- Query ID.activeEndpoints
- currently active endpoints on which this plan will run.rootFragment
- Root major fragment.session
- session context.queryContextInfo
- query context.ExecutionSetupException
public List<QueryWorkUnit> getSplitFragments(OptionList options, CoordinationProtos.DrillbitEndpoint foremanNode, UserBitShared.QueryId queryId, Collection<CoordinationProtos.DrillbitEndpoint> activeEndpoints, PhysicalPlanReader reader, Fragment rootFragment, UserSession session, BitControl.QueryContextInformation queryContextInfo) throws ExecutionSetupException
options
- foremanNode
- queryId
- activeEndpoints
- reader
- rootFragment
- session
- queryContextInfo
- QueryWorkUnit
s.ExecutionSetupException
public void initFragmentWrappers(Fragment rootFragment, PlanningSet planningSet)
protected void traverse(Wrapper fragmentWrapper, Consumer<Wrapper> operation) throws PhysicalOperatorSetupException
PhysicalOperatorSetupException
protected abstract BiFunction<CoordinationProtos.DrillbitEndpoint,PhysicalOperator,Long> getMemory()
protected QueryWorkUnit generateWorkUnit(OptionList options, CoordinationProtos.DrillbitEndpoint foremanNode, UserBitShared.QueryId queryId, Fragment rootNode, PlanningSet planningSet, UserSession session, BitControl.QueryContextInformation queryContextInfo) throws ExecutionSetupException
ExecutionSetupException
Copyright © 1970 The Apache Software Foundation. All rights reserved.