Documentation ¶
Index ¶
Constants ¶
const ( // Sequential means that the tasks will run sequentially. Sequential level = iota //Parallel means that the tasks will run in parallel. Parallel )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CheckpointWriter ¶
type CheckpointWriter struct {
// contains filtered or unexported fields
}
CheckpointWriter saves the checkpoint data into topology server.
func NewCheckpointWriter ¶
func NewCheckpointWriter(ts topo.Server, checkpoint *workflowpb.WorkflowCheckpoint, wi *topo.WorkflowInfo) *CheckpointWriter
NewCheckpointWriter creates a CheckpointWriter.
func (*CheckpointWriter) UpdateTask ¶
func (c *CheckpointWriter) UpdateTask(taskID string, status workflowpb.TaskState, err error) error
UpdateTask updates the task status in the checkpointing copy and saves the full checkpoint to the topology server.
type HorizontalReshardingWorkflow ¶
type HorizontalReshardingWorkflow struct {
// contains filtered or unexported fields
}
HorizontalReshardingWorkflow contains meta-information and methods to control the horizontal resharding workflow.
func (*HorizontalReshardingWorkflow) GetTasks ¶
func (hw *HorizontalReshardingWorkflow) GetTasks(phase PhaseType) []*workflowpb.Task
GetTasks returns selected tasks for a phase from the checkpoint with expected execution order.
func (*HorizontalReshardingWorkflow) Run ¶
func (hw *HorizontalReshardingWorkflow) Run(ctx context.Context, manager *workflow.Manager, wi *topo.WorkflowInfo) error
Run executes the horizontal resharding process. It implements the workflow.Workflow interface.
type HorizontalReshardingWorkflowFactory ¶
type HorizontalReshardingWorkflowFactory struct{}
HorizontalReshardingWorkflowFactory is the factory to create a horizontal resharding workflow.
func (*HorizontalReshardingWorkflowFactory) Init ¶
func (*HorizontalReshardingWorkflowFactory) Init(m *workflow.Manager, w *workflowpb.Workflow, args []string) error
Init is part of the workflow.Factory interface.
func (*HorizontalReshardingWorkflowFactory) Instantiate ¶
func (*HorizontalReshardingWorkflowFactory) Instantiate(m *workflow.Manager, w *workflowpb.Workflow, rootNode *workflow.Node) (workflow.Workflow, error)
Instantiate is part the workflow.Factory interface.
type ParallelRunner ¶
type ParallelRunner struct {
// contains filtered or unexported fields
}
ParallelRunner is used to control executing tasks concurrently. Each phase has its own ParallelRunner object.
func NewParallelRunner ¶
func NewParallelRunner(ctx context.Context, rootUINode *workflow.Node, cp *CheckpointWriter, tasks []*workflowpb.Task, executeFunc func(context.Context, *workflowpb.Task) error, concurrencyLevel level, enableApprovals bool) *ParallelRunner
NewParallelRunner returns a new ParallelRunner.
func (*ParallelRunner) Action ¶
func (p *ParallelRunner) Action(ctx context.Context, path, name string) error
Action handles retrying, approval of the first task and approval of the remaining tasks actions. It implements the interface ActionListener.
func (*ParallelRunner) Run ¶
func (p *ParallelRunner) Run() error
Run is the entry point for controling task executions.
type ReshardingWrangler ¶
type ReshardingWrangler interface { CopySchemaShardFromShard(ctx context.Context, tables, excludeTables []string, includeViews bool, sourceKeyspace, sourceShard, destKeyspace, destShard string, waitSlaveTimeout time.Duration) error WaitForFilteredReplication(ctx context.Context, keyspace, shard string, maxDelay time.Duration) error MigrateServedTypes(ctx context.Context, keyspace, shard string, cells []string, servedType topodatapb.TabletType, reverse, skipReFreshState bool, filteredReplicationWaitTime time.Duration) error }
ReshardingWrangler is the interface to be used in creating mock interface for wrangler, which is used for unit test. It includes a subset of the methods in go/vt/Wrangler.