blockwriter

package
v1.4.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockWriterCase

type BlockWriterCase struct {
	ClusterName string

	sync.RWMutex
	// contains filtered or unexported fields
}

BlockWriterCase is for concurrent writing blocks.

func NewBlockWriterCase

func NewBlockWriterCase(cfg Config) *BlockWriterCase

NewBlockWriterCase returns the BlockWriterCase.

func (*BlockWriterCase) GetConcurrency

func (c *BlockWriterCase) GetConcurrency() int

func (*BlockWriterCase) Start

func (c *BlockWriterCase) Start(db *sql.DB) error

Start starts to run cases

func (*BlockWriterCase) Stop

func (c *BlockWriterCase) Stop()

Stop stops cases

func (*BlockWriterCase) String

func (c *BlockWriterCase) String() string

String implements fmt.Stringer interface.

type Config

type Config struct {
	TableNum    int `yaml:"table_num" json:"table_num"`
	Concurrency int `yaml:"concurrency" json:"concurrency"`
	BatchSize   int `yaml:"batch_size" json:"batch_size"`
	RawSize     int `yaml:"raw_size" json:"raw_size"`
}

Config defines the config of BlockWriterCase

Jump to

Keyboard shortcuts

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