metadata

package
v0.0.0-...-3cbc91d Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const JobManagerUUID = "dataflow-engine-job-manager"

JobManagerUUID defines the global unique id for job manager

Variables

This section is empty.

Functions

func DeleteMasterMeta

func DeleteMasterMeta(
	ctx context.Context,
	metaClient pkgOrm.Client,
	masterID frameModel.MasterID,
) error

DeleteMasterMeta deletes given maste meta from meta store

func StoreMasterMeta

func StoreMasterMeta(
	ctx context.Context,
	metaClient pkgOrm.Client,
	meta *frameModel.MasterMeta,
) error

StoreMasterMeta is exposed to job manager for job master meta persistence

Types

type MasterMetadataClient

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

MasterMetadataClient provides all ways to manage the master metadata

func NewMasterMetadataClient

func NewMasterMetadataClient(
	masterID frameModel.MasterID,
	metaClient pkgOrm.Client,
) *MasterMetadataClient

NewMasterMetadataClient creates a new MasterMetadataClient

func (*MasterMetadataClient) Delete

func (c *MasterMetadataClient) Delete(ctx context.Context) error

Delete deletes the metadata of this master

func (*MasterMetadataClient) Insert

Insert inserts the metadata

func (*MasterMetadataClient) Load

Load queries master metadata from metastore, if the metadata does not exist, create a new one and return it.

func (*MasterMetadataClient) LoadAllMasters

func (c *MasterMetadataClient) LoadAllMasters(ctx context.Context) ([]*frameModel.MasterMeta, error)

LoadAllMasters loads all job masters from metastore

func (*MasterMetadataClient) Store

Store upsert the data

func (*MasterMetadataClient) Update

func (c *MasterMetadataClient) Update(
	ctx context.Context, values ormModel.KeyValueMap,
) error

Update update the data

type WorkerStatusClient

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

WorkerStatusClient provides all ways to manage metadata of all workers belonging to a given master

func NewWorkerStatusClient

func NewWorkerStatusClient(
	masterID frameModel.MasterID,
	metaClient pkgOrm.Client,
) *WorkerStatusClient

NewWorkerStatusClient creates a new WorkerStatusClient instance

func (*WorkerStatusClient) Load

Load queries a worker by its worker id

func (*WorkerStatusClient) LoadAllWorkers

LoadAllWorkers queries all workers of this master

func (*WorkerStatusClient) MasterID

func (c *WorkerStatusClient) MasterID() frameModel.MasterID

MasterID returns the master id of this metadata client

func (*WorkerStatusClient) Remove

Remove deletes a given worker from metastore

func (*WorkerStatusClient) Store

Store stores a worker metadata into metastore

func (*WorkerStatusClient) Update

Update updates a worker metadata

Jump to

Keyboard shortcuts

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