public class SourcePartitionedScheduler extends Object implements SourceScheduler
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
List<Lifespan> |
drainCompletedLifespans() |
PlanNodeId |
getPlanNodeId() |
static SourceScheduler |
newSourcePartitionedSchedulerAsSourceScheduler(SqlStageExecution stage,
PlanNodeId partitionedNode,
SplitSource splitSource,
SplitPlacementPolicy splitPlacementPolicy,
int splitBatchSize,
boolean groupedExecution)
Obtains a
SourceScheduler suitable for use in FixedSourcePartitionedScheduler. |
static StageScheduler |
newSourcePartitionedSchedulerAsStageScheduler(SqlStageExecution stage,
PlanNodeId partitionedNode,
SplitSource splitSource,
SplitPlacementPolicy splitPlacementPolicy,
int splitBatchSize)
Obtains an instance of
SourcePartitionedScheduler suitable for use as a
stage scheduler. |
void |
noMoreLifespans() |
ScheduleResult |
schedule() |
void |
startLifespan(Lifespan lifespan,
ConnectorPartitionHandle partitionHandle) |
public PlanNodeId getPlanNodeId()
getPlanNodeId in interface SourceSchedulerpublic static StageScheduler newSourcePartitionedSchedulerAsStageScheduler(SqlStageExecution stage, PlanNodeId partitionedNode, SplitSource splitSource, SplitPlacementPolicy splitPlacementPolicy, int splitBatchSize)
SourcePartitionedScheduler suitable for use as a
stage scheduler.
This returns an ungrouped SourcePartitionedScheduler that requires
minimal management from the caller, which is ideal for use as a stage scheduler.
public static SourceScheduler newSourcePartitionedSchedulerAsSourceScheduler(SqlStageExecution stage, PlanNodeId partitionedNode, SplitSource splitSource, SplitPlacementPolicy splitPlacementPolicy, int splitBatchSize, boolean groupedExecution)
SourceScheduler suitable for use in FixedSourcePartitionedScheduler.
This returns a SourceScheduler that can be used for a pipeline
that is either ungrouped or grouped. However, the caller is responsible initializing
the driver groups in this scheduler accordingly.
Besides, the caller is required to poll drainCompletedLifespans()
in addition to schedule() on the returned object. Otherwise, lifecycle
transitioning of the object will not work properly.
public void startLifespan(Lifespan lifespan, ConnectorPartitionHandle partitionHandle)
startLifespan in interface SourceSchedulerpublic void noMoreLifespans()
noMoreLifespans in interface SourceSchedulerpublic ScheduleResult schedule()
schedule in interface SourceSchedulerpublic void close()
close in interface SourceSchedulerpublic List<Lifespan> drainCompletedLifespans()
drainCompletedLifespans in interface SourceSchedulerCopyright © 2012–2019. All rights reserved.