partitionstorage

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithRequestPriotiry

func WithRequestPriotiry(priority spannerpb.RequestOptions_Priority) spannerOption

WithRequestPriotiry set the priority option for spanner requests. Default value is unspecified, equivalent to high.

Types

type InmemoryPartitionStorage

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

InmemoryPartitionStorage implements PartitionStorage that stores PartitionMetadata in memory.

func NewInmemory

func NewInmemory() *InmemoryPartitionStorage

NewInmemory creates new instance of InmemoryPartitionStorage

func (*InmemoryPartitionStorage) AddChildPartitions

func (*InmemoryPartitionStorage) GetInterruptedPartitions

func (s *InmemoryPartitionStorage) GetInterruptedPartitions(ctx context.Context) ([]*model.PartitionMetadata, error)

func (*InmemoryPartitionStorage) GetSchedulablePartitions

func (s *InmemoryPartitionStorage) GetSchedulablePartitions(ctx context.Context, minWatermark time.Time) ([]*model.PartitionMetadata, error)

func (*InmemoryPartitionStorage) GetUnfinishedMinWatermarkPartition

func (s *InmemoryPartitionStorage) GetUnfinishedMinWatermarkPartition(ctx context.Context) (*model.PartitionMetadata, error)

func (*InmemoryPartitionStorage) InitializeRootPartition

func (s *InmemoryPartitionStorage) InitializeRootPartition(ctx context.Context, startTimestamp time.Time, endTimestamp time.Time, heartbeatInterval time.Duration) error

func (*InmemoryPartitionStorage) UpdateToFinished

func (s *InmemoryPartitionStorage) UpdateToFinished(ctx context.Context, partition *model.PartitionMetadata) error

func (*InmemoryPartitionStorage) UpdateToRunning

func (s *InmemoryPartitionStorage) UpdateToRunning(ctx context.Context, partition *model.PartitionMetadata) error

func (*InmemoryPartitionStorage) UpdateToScheduled

func (s *InmemoryPartitionStorage) UpdateToScheduled(ctx context.Context, partitions []*model.PartitionMetadata) error

func (*InmemoryPartitionStorage) UpdateWatermark

func (s *InmemoryPartitionStorage) UpdateWatermark(ctx context.Context, partition *model.PartitionMetadata, watermark time.Time) error

type SpannerPartitionStorage

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

InmemoryPartitionStorage implements PartitionStorage that stores PartitionMetadata in Cloud Spanner.

func NewSpanner

func NewSpanner(client *spanner.Client, tableName string, options ...spannerOption) *SpannerPartitionStorage

NewSpanner creates new instance of SpannerPartitionStorage

func (*SpannerPartitionStorage) AddChildPartitions

func (*SpannerPartitionStorage) CreateTableIfNotExists

func (s *SpannerPartitionStorage) CreateTableIfNotExists(ctx context.Context) error

func (*SpannerPartitionStorage) GetInterruptedPartitions

func (s *SpannerPartitionStorage) GetInterruptedPartitions(ctx context.Context) ([]*model.PartitionMetadata, error)

func (*SpannerPartitionStorage) GetSchedulablePartitions

func (s *SpannerPartitionStorage) GetSchedulablePartitions(ctx context.Context, minWatermark time.Time) ([]*model.PartitionMetadata, error)

func (*SpannerPartitionStorage) GetUnfinishedMinWatermarkPartition

func (s *SpannerPartitionStorage) GetUnfinishedMinWatermarkPartition(ctx context.Context) (*model.PartitionMetadata, error)

func (*SpannerPartitionStorage) InitializeRootPartition

func (s *SpannerPartitionStorage) InitializeRootPartition(ctx context.Context, startTimestamp time.Time, endTimestamp time.Time, heartbeatInterval time.Duration) error

func (*SpannerPartitionStorage) UpdateToFinished

func (s *SpannerPartitionStorage) UpdateToFinished(ctx context.Context, partition *model.PartitionMetadata) error

func (*SpannerPartitionStorage) UpdateToRunning

func (s *SpannerPartitionStorage) UpdateToRunning(ctx context.Context, partition *model.PartitionMetadata) error

func (*SpannerPartitionStorage) UpdateToScheduled

func (s *SpannerPartitionStorage) UpdateToScheduled(ctx context.Context, partitions []*model.PartitionMetadata) error

func (*SpannerPartitionStorage) UpdateWatermark

func (s *SpannerPartitionStorage) UpdateWatermark(ctx context.Context, partition *model.PartitionMetadata, watermark time.Time) error

Jump to

Keyboard shortcuts

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