Documentation ¶
Index ¶
- Constants
- func DeleteMasterMeta(ctx context.Context, metaClient pkgOrm.Client, masterID frameModel.MasterID) error
- func StoreMasterMeta(ctx context.Context, metaClient pkgOrm.Client, meta *frameModel.MasterMeta) error
- type MasterMetadataClient
- func (c *MasterMetadataClient) Delete(ctx context.Context) error
- func (c *MasterMetadataClient) Insert(ctx context.Context, data *frameModel.MasterMeta) error
- func (c *MasterMetadataClient) Load(ctx context.Context) (*frameModel.MasterMeta, error)
- func (c *MasterMetadataClient) LoadAllMasters(ctx context.Context) ([]*frameModel.MasterMeta, error)
- func (c *MasterMetadataClient) Store(ctx context.Context, data *frameModel.MasterMeta) error
- func (c *MasterMetadataClient) Update(ctx context.Context, values ormModel.KeyValueMap) error
- type WorkerStatusClient
- func (c *WorkerStatusClient) Load(ctx context.Context, workerID frameModel.WorkerID) (*frameModel.WorkerStatus, error)
- func (c *WorkerStatusClient) LoadAllWorkers(ctx context.Context) (map[frameModel.WorkerID]*frameModel.WorkerStatus, error)
- func (c *WorkerStatusClient) MasterID() frameModel.MasterID
- func (c *WorkerStatusClient) Remove(ctx context.Context, id frameModel.WorkerID) (bool, error)
- func (c *WorkerStatusClient) Store(ctx context.Context, data *frameModel.WorkerStatus) error
- func (c *WorkerStatusClient) Update(ctx context.Context, data *frameModel.WorkerStatus) error
Constants ¶
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 ¶
func (c *MasterMetadataClient) Insert(ctx context.Context, data *frameModel.MasterMeta) error
Insert inserts the metadata
func (*MasterMetadataClient) Load ¶
func (c *MasterMetadataClient) Load(ctx context.Context) (*frameModel.MasterMeta, error)
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 ¶
func (c *MasterMetadataClient) Store(ctx context.Context, data *frameModel.MasterMeta) error
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 ¶
func (c *WorkerStatusClient) Load(ctx context.Context, workerID frameModel.WorkerID) (*frameModel.WorkerStatus, error)
Load queries a worker by its worker id
func (*WorkerStatusClient) LoadAllWorkers ¶
func (c *WorkerStatusClient) LoadAllWorkers(ctx context.Context) (map[frameModel.WorkerID]*frameModel.WorkerStatus, error)
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 ¶
func (c *WorkerStatusClient) Remove(ctx context.Context, id frameModel.WorkerID) (bool, error)
Remove deletes a given worker from metastore
func (*WorkerStatusClient) Store ¶
func (c *WorkerStatusClient) Store(ctx context.Context, data *frameModel.WorkerStatus) error
Store stores a worker metadata into metastore
func (*WorkerStatusClient) Update ¶
func (c *WorkerStatusClient) Update(ctx context.Context, data *frameModel.WorkerStatus) error
Update updates a worker metadata