Documentation ¶
Index ¶
- Constants
- func Build(id string, ctx cruntime.ReconcileRequestContext) (base.Engine, error)
- func Precheck(client client.Client, key types.NamespacedName) (found bool, err error)
- type Endpoint
- type Fuse
- type Level
- type Master
- type NodeAffinity
- type NodeSelector
- type NodeSelectorRequirement
- type NodeSelectorTerm
- type TieredStore
- type Vineyard
- type VineyardEngine
- func (e *VineyardEngine) AssignNodesToCache(desiredNum int32) (currentScheduleNum int32, err error)
- func (e *VineyardEngine) BindToDataset() (err error)
- func (e *VineyardEngine) CheckAndUpdateRuntimeStatus() (ready bool, err error)
- func (e *VineyardEngine) CheckMasterReady() (ready bool, err error)
- func (e *VineyardEngine) CheckRuntimeHealthy() (err error)
- func (e *VineyardEngine) CheckRuntimeReady() (ready bool)
- func (e *VineyardEngine) CheckWorkersReady() (ready bool, err error)
- func (e *VineyardEngine) CreateDataLoadJob(ctx cruntime.ReconcileRequestContext, targetDataload datav1alpha1.DataLoad) (err error)
- func (e *VineyardEngine) CreateDataMigrateJob(ctx cruntime.ReconcileRequestContext, ...) error
- func (e *VineyardEngine) CreateVolume() (err error)
- func (e *VineyardEngine) DeleteVolume() (err error)
- func (e *VineyardEngine) FreeStorageBytes() (value int64, err error)
- func (e *VineyardEngine) GetDataOperationValueFile(ctx cruntime.ReconcileRequestContext, ...) (valueFileName string, err error)
- func (e *VineyardEngine) GetReportSummary() (summary []string, err error)
- func (e VineyardEngine) ParseReportSummary(s []string) string
- func (e *VineyardEngine) PrepareUFS() (err error)
- func (e *VineyardEngine) SetupMaster() (err error)
- func (e *VineyardEngine) SetupWorkers() (err error)
- func (e *VineyardEngine) ShouldCheckUFS() (should bool, err error)
- func (e *VineyardEngine) ShouldSetupMaster() (should bool, err error)
- func (e *VineyardEngine) ShouldSetupWorkers() (should bool, err error)
- func (e *VineyardEngine) ShouldUpdateUFS() (ufsToUpdate *utils.UFSToUpdate)
- func (e *VineyardEngine) Shutdown() (err error)
- func (e *VineyardEngine) SyncMetadata() (err error)
- func (e *VineyardEngine) SyncReplicas(ctx cruntime.ReconcileRequestContext) (err error)
- func (e *VineyardEngine) SyncRuntime(ctx cruntime.ReconcileRequestContext) (changed bool, err error)
- func (e *VineyardEngine) SyncScheduleInfoToCacheNodes() (err error)
- func (e *VineyardEngine) TotalFileNums() (value int64, err error)
- func (e *VineyardEngine) TotalStorageBytes() (value int64, err error)
- func (e *VineyardEngine) UpdateCacheOfDataset() (err error)
- func (e *VineyardEngine) UpdateDatasetStatus(phase datav1alpha1.DatasetPhase) (err error)
- func (e *VineyardEngine) UpdateOnUFSChange(ufsToUpdate *utils.UFSToUpdate) (updateReady bool, err error)
- func (e *VineyardEngine) UsedStorageBytes() (value int64, err error)
- type Worker
Constants ¶
const ( MasterPeerName = "peer" MasterPeerPort = 2380 MasterClientName = "client" MasterClientPort = 2379 WorkerRPCName = "rpc" WorkerRPCPort = 9600 WorkerExporterName = "exporter" WorkerExporterPort = 9144 // whether to reserve memory for vineyardd WorkerReserveMemory = "vineyardd.reserve.memory" DefaultWorkerReserveMemoryValue = "true" // the prefix of etcd key for vineyard objects WorkerEtcdPrefix = "etcd.prefix" DefaultWorkerEtcdPrefixValue = "/vineyard" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Endpoint ¶
type Endpoint struct { URI string `json:"uri,omitempty"` EncryptOptions []datav1alpha1.EncryptOption `json:"encryptOptions,omitempty"` Options map[string]string `json:"options,omitempty"` }
type Fuse ¶
type Fuse struct { Image string `json:"image,omitempty"` ImageTag string `json:"imageTag,omitempty"` ImagePullPolicy string `json:"imagePullPolicy,omitempty"` Env map[string]string `json:"env,omitempty"` CleanPolicy datav1alpha1.FuseCleanPolicy `json:"cleanPolicy,omitempty"` TargetPath string `json:"targetPath,omitempty"` NodeSelector map[string]string `json:"nodeSelector,omitempty"` Resources common.Resources `json:"resources,omitempty"` HostPID bool `json:"hostPID,omitempty"` }
type Level ¶
type Level struct { MediumType common.MediumType `json:"mediumtype,omitempty"` VolumeType common.VolumeType `json:"volumetype,omitempty"` VolumeSource datav1alpha1.VolumeSource `json:"volumesource,omitempty"` Level int `json:"level,omitempty"` Path string `json:"path,omitempty"` Quota *resource.Quantity `json:"quota,omitempty"` QuotaList string `json:"quotaList,omitempty"` High string `json:"high,omitempty"` Low string `json:"low,omitempty"` }
type Master ¶
type Master struct { Replicas int32 `json:"replicas,omitempty"` Image string `json:"image,omitempty"` ImageTag string `json:"imageTag,omitempty"` ImagePullPolicy string `json:"imagePullPolicy,omitempty"` NodeSelector map[string]string `json:"nodeSelector,omitempty"` Ports map[string]int `json:"ports,omitempty"` Env map[string]string `json:"env,omitempty"` Options map[string]string `json:"options,omitempty"` Resources common.Resources `json:"resources,omitempty"` VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"` ExternalEndpoint Endpoint `json:"externalEndpoint,omitempty"` }
type NodeAffinity ¶
type NodeAffinity struct { // If the affinity requirements specified by this field are not met at // scheduling time, the pod will not be scheduled onto the node. // If the affinity requirements specified by this field cease to be met // at some point during pod execution (e.g. due to an update), the system // may or may not try to eventually evict the pod from its node. // +optional RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector `json:"requiredDuringSchedulingIgnoredDuringExecution"` }
type NodeSelector ¶
type NodeSelector struct { //Required. A list of node selector terms. NodeSelectorTerms []NodeSelectorTerm `json:"nodeSelectorTerms"` }
NodeSelector represents the union of the results of one or more label queries over a set of nodes; that is, it represents the OR of the selectors represented by the node selector terms.
type NodeSelectorRequirement ¶
type NodeSelectorRequirement struct { // The label key that the selector applies to. Key string `json:"key,omitempty"` // Represents a key's relationship to a set of values. // Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt. Operator string `json:"operator,omitempty"` // +optional Values []string `json:"values,omitempty"` }
NodeSelectorRequirement is a selector that contains values, a key, and an operator that relates the key and values.
type NodeSelectorTerm ¶
type NodeSelectorTerm struct { // A list of node selector requirements by node's labels. MatchExpressions []NodeSelectorRequirement `json:"matchExpressions"` }
NodeSelectorTerm represents expressions and fields required to select nodes. A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
type TieredStore ¶
type TieredStore struct {
Levels []Level `json:"levels,omitempty"`
}
type Vineyard ¶
type Vineyard struct { FullnameOverride string `json:"fullnameOverride"` common.ImageInfo `json:",inline"` common.UserInfo `json:",inline"` Master `json:"master,omitempty"` Worker `json:"worker,omitempty"` Owner *common.OwnerReference `json:"owner,omitempty"` Fuse `json:"fuse,omitempty"` TieredStore TieredStore `json:"tieredstore,omitempty"` DisablePrometheus bool `json:"disablePrometheus,omitempty"` Volumes []corev1.Volume `json:"volumes,omitempty"` }
The value yaml file
type VineyardEngine ¶
type VineyardEngine struct { Log logr.Logger client.Client MetadataSyncDoneCh chan base.MetadataSyncResult Recorder record.EventRecorder *ctrl.Helper // contains filtered or unexported fields }
func (*VineyardEngine) AssignNodesToCache ¶
func (e *VineyardEngine) AssignNodesToCache(desiredNum int32) (currentScheduleNum int32, err error)
AssignNodesToCache finds nodes to place the cache engine
func (*VineyardEngine) BindToDataset ¶
func (e *VineyardEngine) BindToDataset() (err error)
func (*VineyardEngine) CheckAndUpdateRuntimeStatus ¶
func (e *VineyardEngine) CheckAndUpdateRuntimeStatus() (ready bool, err error)
CheckAndUpdateRuntimeStatus checks the related runtime status and updates it.
func (*VineyardEngine) CheckMasterReady ¶
func (e *VineyardEngine) CheckMasterReady() (ready bool, err error)
CheckMasterReady checks if the master is ready
func (*VineyardEngine) CheckRuntimeHealthy ¶
func (e *VineyardEngine) CheckRuntimeHealthy() (err error)
CheckRuntimeHealthy checks the healthy of the runtime
func (*VineyardEngine) CheckRuntimeReady ¶
func (e *VineyardEngine) CheckRuntimeReady() (ready bool)
func (*VineyardEngine) CheckWorkersReady ¶
func (e *VineyardEngine) CheckWorkersReady() (ready bool, err error)
are the workers ready
func (*VineyardEngine) CreateDataLoadJob ¶
func (e *VineyardEngine) CreateDataLoadJob(ctx cruntime.ReconcileRequestContext, targetDataload datav1alpha1.DataLoad) (err error)
CreateDataLoadJob creates the job to load data
func (*VineyardEngine) CreateDataMigrateJob ¶
func (e *VineyardEngine) CreateDataMigrateJob(ctx cruntime.ReconcileRequestContext, targetDataMigrate datav1alpha1.DataMigrate) error
func (*VineyardEngine) CreateVolume ¶
func (e *VineyardEngine) CreateVolume() (err error)
CreateVolume creates volume
func (*VineyardEngine) DeleteVolume ¶
func (e *VineyardEngine) DeleteVolume() (err error)
DeleteVolume creates volume
func (*VineyardEngine) FreeStorageBytes ¶
func (e *VineyardEngine) FreeStorageBytes() (value int64, err error)
FreeStorageBytes returns free storage size of Vineyard in bytes
func (*VineyardEngine) GetDataOperationValueFile ¶
func (e *VineyardEngine) GetDataOperationValueFile(ctx cruntime.ReconcileRequestContext, operation dataoperation.OperationInterface) (valueFileName string, err error)
func (*VineyardEngine) GetReportSummary ¶
func (e *VineyardEngine) GetReportSummary() (summary []string, err error)
reportSummary reports vineyard summary
func (VineyardEngine) ParseReportSummary ¶
func (e VineyardEngine) ParseReportSummary(s []string) string
parse vineyard report summary to cached
func (*VineyardEngine) PrepareUFS ¶
func (e *VineyardEngine) PrepareUFS() (err error)
PrepareUFS does all the UFS preparations
func (*VineyardEngine) SetupMaster ¶
func (e *VineyardEngine) SetupMaster() (err error)
SetupMaster setups the master and updates the status It will print the information in the Debug window according to the Master status It return any cache error encountered
func (*VineyardEngine) SetupWorkers ¶
func (e *VineyardEngine) SetupWorkers() (err error)
SetupWorkers checks the desired and current replicas of workers and makes an update over the status by setting phases and conditions. The function calls for a status update and finally returns error if anything unexpected happens.
func (*VineyardEngine) ShouldCheckUFS ¶
func (e *VineyardEngine) ShouldCheckUFS() (should bool, err error)
ShouldCheckUFS checks if it requires checking UFS
func (*VineyardEngine) ShouldSetupMaster ¶
func (e *VineyardEngine) ShouldSetupMaster() (should bool, err error)
ShouldSetupMaster checks if we need setup the master
func (*VineyardEngine) ShouldSetupWorkers ¶
func (e *VineyardEngine) ShouldSetupWorkers() (should bool, err error)
ShouldSetupWorkers checks if we need setup the workers
func (*VineyardEngine) ShouldUpdateUFS ¶
func (e *VineyardEngine) ShouldUpdateUFS() (ufsToUpdate *utils.UFSToUpdate)
func (*VineyardEngine) Shutdown ¶
func (e *VineyardEngine) Shutdown() (err error)
shut down the Vineyard engine
func (*VineyardEngine) SyncMetadata ¶
func (e *VineyardEngine) SyncMetadata() (err error)
SyncMetadata syncs metadata if necessary you should call this function periodically to make sure the function actually takes effect.
func (*VineyardEngine) SyncReplicas ¶
func (e *VineyardEngine) SyncReplicas(ctx cruntime.ReconcileRequestContext) (err error)
SyncReplicas syncs the replicas
func (*VineyardEngine) SyncRuntime ¶
func (e *VineyardEngine) SyncRuntime(ctx cruntime.ReconcileRequestContext) (changed bool, err error)
SyncRuntime syncs the runtime spec
func (*VineyardEngine) SyncScheduleInfoToCacheNodes ¶
func (e *VineyardEngine) SyncScheduleInfoToCacheNodes() (err error)
SyncScheduleInfoToCacheNodes syncs schedule info to nodes
func (*VineyardEngine) TotalFileNums ¶
func (e *VineyardEngine) TotalFileNums() (value int64, err error)
TotalFileNums returns the total num of files in Vineyard
func (*VineyardEngine) TotalStorageBytes ¶
func (e *VineyardEngine) TotalStorageBytes() (value int64, err error)
TotalStorageBytes returns total storage size of Vineyard in bytes
func (*VineyardEngine) UpdateCacheOfDataset ¶
func (e *VineyardEngine) UpdateCacheOfDataset() (err error)
UpdateCacheOfDataset updates the CacheStates and Runtimes of the dataset.
func (*VineyardEngine) UpdateDatasetStatus ¶
func (e *VineyardEngine) UpdateDatasetStatus(phase datav1alpha1.DatasetPhase) (err error)
UpdateDatasetStatus updates the status of the dataset
func (*VineyardEngine) UpdateOnUFSChange ¶
func (e *VineyardEngine) UpdateOnUFSChange(ufsToUpdate *utils.UFSToUpdate) (updateReady bool, err error)
func (*VineyardEngine) UsedStorageBytes ¶
func (e *VineyardEngine) UsedStorageBytes() (value int64, err error)
UsedStorageBytes returns used storage size of Vineyard in bytes
type Worker ¶
type Worker struct { Replicas int32 `json:"replicas,omitempty"` Image string `json:"image,omitempty"` ImageTag string `json:"imageTag,omitempty"` ImagePullPolicy string `json:"imagePullPolicy,omitempty"` NodeSelector map[string]string `json:"nodeSelector,omitempty"` Ports map[string]int `json:"ports,omitempty"` Env map[string]string `json:"env,omitempty"` Options map[string]string `json:"options,omitempty"` Resources common.Resources `json:"resources,omitempty"` VolumeMounts []corev1.VolumeMount `json:"volumeMounts,omitempty"` }
Source Files ¶
- cache.go
- const.go
- create_volume.go
- data_migrate.go
- dataset.go
- delete_volume.go
- engine.go
- health_check.go
- label.go
- load_data.go
- master.go
- master_internal.go
- metadata.go
- node.go
- operator.go
- process_data.go
- replicas.go
- report.go
- runtime_info.go
- shut_down.go
- status.go
- sync_runtime.go
- transform.go
- transform_resources.go
- transform_volumes.go
- type.go
- types_selector.go
- ufs.go
- utils.go
- worker.go