metastore

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2019 License: Apache-2.0 Imports: 19 Imported by: 9

Documentation

Index

Constants

View Source
const (
	DefaultBatchSize                      = 2097152
	DefaultArchivingDelayMinutes          = 1440
	DefaultArchivingIntervalMinutes       = 180
	DefaultBackfillIntervalMinutes        = 60
	DefaultBackfillMaxBufferSize    int64 = 4294967296
	DefaultBackfillThresholdInBytes int64 = 2097152
	DefaultBackfillStoreBatchSize         = 20000
	DefaultRecordRetentionInDays          = 90
	DefaultSnapshotIntervalMinutes        = 360                  // 6 hours
	DefaultSnapshotThreshold              = 3 * DefaultBatchSize // 3 batches
	DefaultRedologRotationInterval        = 10800                // 3 hours
	DefaultMaxRedoLogSize                 = 1 << 30              // 1 GB
)

meaningful defaults of table configurations.

Variables

View Source
var DefaultTableConfig = common.TableConfig{
	BatchSize:                DefaultBatchSize,
	ArchivingIntervalMinutes: DefaultArchivingIntervalMinutes,
	ArchivingDelayMinutes:    DefaultArchivingDelayMinutes,
	BackfillMaxBufferSize:    DefaultBackfillMaxBufferSize,
	BackfillIntervalMinutes:  DefaultBackfillIntervalMinutes,
	BackfillThresholdInBytes: DefaultBackfillThresholdInBytes,
	BackfillStoreBatchSize:   DefaultBackfillStoreBatchSize,
	RecordRetentionInDays:    DefaultRecordRetentionInDays,
	SnapshotIntervalMinutes:  DefaultSnapshotIntervalMinutes,
	SnapshotThreshold:        DefaultSnapshotThreshold,
	RedoLogRotationInterval:  DefaultRedologRotationInterval,
	MaxRedoLogFileSize:       DefaultMaxRedoLogSize,
}

DefaultTableConfig represents default table config

Functions

func NewDiskMetaStore

func NewDiskMetaStore(basePath string) (common.MetaStore, error)

NewDiskMetaStore creates a new disk based metastore

func ValidateDefaultValue

func ValidateDefaultValue(valueStr, dataTypeStr string) (err error)

ValidateDefaultValue validates default value against data type

Types

type SchemaFetchJob

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

SchemaFetchJob is a job that periodically pings ares-controller and updates table schemas if applicable

func NewSchemaFetchJob

func NewSchemaFetchJob(intervalInSeconds int, schemaMutator common.TableSchemaMutator, enumUpdater memCom.EnumUpdater, schemaValidator TableSchemaValidator, controllerClient controllerCli.ControllerClient, enumMutator controllerMutatorCom.EnumMutator, clusterName, initialHash string) *SchemaFetchJob

NewSchemaFetchJob creates a new SchemaFetchJob

func (*SchemaFetchJob) FetchEnum added in v0.0.2

func (j *SchemaFetchJob) FetchEnum()

FetchEnum updates all enums

func (*SchemaFetchJob) FetchSchema added in v0.0.2

func (j *SchemaFetchJob) FetchSchema()

func (*SchemaFetchJob) Run

func (j *SchemaFetchJob) Run()

Run starts the scheduling

func (*SchemaFetchJob) Stop

func (j *SchemaFetchJob) Stop()

Stop stops the scheduling

type TableSchemaValidator

type TableSchemaValidator interface {
	SetOldTable(table common.Table)
	SetNewTable(table common.Table)
	Validate() error
}

TableSchemaValidator validates it a new table schema is valid, given existing schema

func NewTableSchameValidator

func NewTableSchameValidator() TableSchemaValidator

NewTableSchameValidator returns a new TableSchemaValidator. Pass nil for oldTable if none exists

Directories

Path Synopsis
Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0
Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0

Jump to

Keyboard shortcuts

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