loaddata

package
v0.0.0-...-503c688 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Import int64 = 1
)

TaskStep of LoadData.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chunk

type Chunk struct {
	Path         string
	Offset       int64
	EndOffset    int64
	PrevRowIDMax int64
	RowIDMax     int64
	Type         mydump.SourceType
	Compression  mydump.Compression
	Timestamp    int64
}

Chunk records the chunk information.

type FlowHandle

type FlowHandle struct{}

FlowHandle is the dispatcher for load data.

func (*FlowHandle) ProcessErrFlow

func (*FlowHandle) ProcessErrFlow(_ context.Context, _ dispatcher.TaskHandle, gTask *proto.Task, receiveErr [][]byte) ([]byte, error)

ProcessErrFlow implements dispatcher.ProcessErrFlow interface.

func (*FlowHandle) ProcessNormalFlow

func (*FlowHandle) ProcessNormalFlow(ctx context.Context, _ dispatcher.TaskHandle, gTask *proto.Task) ([][]byte, error)

ProcessNormalFlow implements dispatcher.TaskFlowHandle interface.

type ImportScheduler

type ImportScheduler struct {
	// contains filtered or unexported fields
}

ImportScheduler is a scheduler for load data.

func (*ImportScheduler) CleanupSubtaskExecEnv

func (s *ImportScheduler) CleanupSubtaskExecEnv(ctx context.Context) (err error)

CleanupSubtaskExecEnv implements the Scheduler.CleanupSubtaskExecEnv interface.

func (*ImportScheduler) InitSubtaskExecEnv

func (s *ImportScheduler) InitSubtaskExecEnv(ctx context.Context) error

InitSubtaskExecEnv implements the Scheduler.InitSubtaskExecEnv interface.

func (*ImportScheduler) OnSubtaskFinished

func (s *ImportScheduler) OnSubtaskFinished(context.Context, []byte) error

OnSubtaskFinished implements the Scheduler.OnSubtaskFinished interface.

func (*ImportScheduler) Rollback

func (s *ImportScheduler) Rollback(context.Context) error

Rollback implements the Scheduler.Rollback interface. TODO: add rollback

func (*ImportScheduler) SplitSubtask

func (s *ImportScheduler) SplitSubtask(ctx context.Context, bs []byte) ([]proto.MinimalTask, error)

SplitSubtask implements the Scheduler.SplitSubtask interface.

type ImportSubtaskExecutor

type ImportSubtaskExecutor struct {
	// contains filtered or unexported fields
}

ImportSubtaskExecutor is a subtask executor for load data.

func (*ImportSubtaskExecutor) Run

Run implements the SubtaskExecutor.Run interface.

type MinimalTaskMeta

type MinimalTaskMeta struct {
	Plan          importer.Plan
	Chunk         Chunk
	TableImporter *importer.TableImporter
	DataEngine    *backend.OpenedEngine
	IndexEngine   *backend.OpenedEngine
}

MinimalTaskMeta is the minimal task of LoadData. Scheduler will split the subtask into minimal tasks(Chunks -> Chunk)

func (MinimalTaskMeta) IsMinimalTask

func (MinimalTaskMeta) IsMinimalTask()

IsMinimalTask implements the MinimalTask interface.

type SubtaskMeta

type SubtaskMeta struct {
	Plan   importer.Plan
	ID     int32
	Chunks []Chunk
}

SubtaskMeta is the subtask of LoadData. Dispatcher will split the task into subtasks(FileInfos -> Chunks) All the field should be serializable.

type TaskMeta

type TaskMeta struct {
	Plan importer.Plan
}

TaskMeta is the task of LoadData. All the field should be serializable.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL