jindo

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CSI_DRIVER = "fuse.csi.fluid.io"

	Mount_TYPE = "mount_type"

	SUMMARY_PREFIX_TOTAL_CAPACITY = "Total Capacity: "

	SUMMARY_PREFIX_USED_CAPACITY = "Used Capacity: "

	METADATA_SYNC_NOT_DONE_MSG = "[Calculating]"

	CHECK_METADATA_SYNC_DONE_TIMEOUT_MILLISEC = 500
)

Variables

This section is empty.

Functions

Types

type Fuse

type Fuse struct {
	Args           []string          `yaml:"args"`
	HostPath       string            `yaml:"hostPath"`
	NodeSelector   map[string]string `yaml:"nodeSelector,omitempty"`
	FuseProperties map[string]string `yaml:"properties"`
}

type Jindo

type Jindo struct {
	Image           string            `yaml:"image"`
	ImageTag        string            `yaml:"imageTag"`
	ImagePullPolicy string            `yaml:"imagePullPolicy"`
	FuseImage       string            `yaml:"fuseImage"`
	FuseImageTag    string            `yaml:"fuseImageTag"`
	User            int               `yaml:"user"`
	Group           int               `yaml:"group"`
	FsGroup         int               `yaml:"fsGroup"`
	UseHostNetwork  bool              `yaml:"useHostNetwork"`
	UseHostPID      bool              `yaml:"useHostPID"`
	Properties      map[string]string `yaml:"properties"`
	Master          Master            `yaml:"master"`
	Worker          Worker            `yaml:"worker"`
	Fuse            Fuse              `yaml:"fuse"`
	Mounts          Mounts            `yaml:"mounts"`
}

type JindoEngine

type JindoEngine struct {
	Log logr.Logger
	client.Client

	MetadataSyncDoneCh chan MetadataSyncResult
	// contains filtered or unexported fields
}

func (*JindoEngine) AssignNodesToCache

func (e *JindoEngine) AssignNodesToCache(desiredNum int32) (currentScheduleNum int32, err error)

func (*JindoEngine) BindToDataset

func (e *JindoEngine) BindToDataset() (err error)

func (*JindoEngine) CheckAndUpdateRuntimeStatus

func (e *JindoEngine) CheckAndUpdateRuntimeStatus() (ready bool, err error)

CheckAndUpdateRuntimeStatus checks the related runtime status and updates it.

func (*JindoEngine) CheckMasterReady

func (e *JindoEngine) CheckMasterReady() (ready bool, err error)

func (*JindoEngine) CheckRuntimeHealthy

func (e *JindoEngine) CheckRuntimeHealthy() (err error)

func (*JindoEngine) CheckWorkersReady

func (e *JindoEngine) CheckWorkersReady() (ready bool, err error)

are the workers ready

func (*JindoEngine) CreateVolume

func (e *JindoEngine) CreateVolume() (err error)

CreateVolume creates volume

func (*JindoEngine) DeleteVolume

func (e *JindoEngine) DeleteVolume() (err error)

DeleteVolume

func (*JindoEngine) FreeStorageBytes

func (e *JindoEngine) FreeStorageBytes() (value int64, err error)

FreeStorageBytes returns free storage size of Jindo in bytes

func (*JindoEngine) PrepareUFS

func (e *JindoEngine) PrepareUFS() (err error)

PrepareUFS do all the UFS preparations

func (*JindoEngine) SetupMaster

func (e *JindoEngine) 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 (*JindoEngine) SetupWorkers

func (e *JindoEngine) 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 (*JindoEngine) ShouldCheckUFS

func (e *JindoEngine) ShouldCheckUFS() (should bool, err error)

ShouldCheckUFS checks if it requires checking UFS

func (*JindoEngine) ShouldSetupMaster

func (e *JindoEngine) ShouldSetupMaster() (should bool, err error)

ShouldSetupMaster checks if we need setup the master

func (*JindoEngine) ShouldSetupWorkers

func (e *JindoEngine) ShouldSetupWorkers() (should bool, err error)

ShouldSetupWorkers checks if we need setup the workers

func (*JindoEngine) Shutdown

func (e *JindoEngine) Shutdown() (err error)

shut down the Jindo engine

func (*JindoEngine) SyncMetadata

func (e *JindoEngine) SyncMetadata() (err error)

func (JindoEngine) SyncReplicas

func (e JindoEngine) SyncReplicas(ctx cruntime.ReconcileRequestContext) (err error)

func (*JindoEngine) TotalFileNums

func (e *JindoEngine) TotalFileNums() (value int64, err error)

return the total num of files in Jindo

func (*JindoEngine) TotalJindoStorageBytes

func (e *JindoEngine) TotalJindoStorageBytes(name string) (value int64, err error)

return total storage size of Jindo in bytes

func (*JindoEngine) TotalStorageBytes

func (e *JindoEngine) TotalStorageBytes() (value int64, err error)

return total storage size of Jindo in bytes

func (*JindoEngine) UpdateCacheOfDataset

func (e *JindoEngine) UpdateCacheOfDataset() (err error)

func (*JindoEngine) UpdateDatasetStatus

func (e *JindoEngine) UpdateDatasetStatus(phase datav1alpha1.DatasetPhase) (err error)

func (*JindoEngine) UsedStorageBytes

func (e *JindoEngine) UsedStorageBytes() (value int64, err error)

UsedStorageBytes returns used storage size of Jindo in bytes

type Master

type Master struct {
	ReplicaCount     int               `yaml:"replicaCount"`
	Resources        Resources         `yaml:"resources"`
	NodeSelector     map[string]string `yaml:"nodeSelector,omitempty"`
	MasterProperties map[string]string `yaml:"properties"`
}

type MetadataSyncResult

type MetadataSyncResult struct {
	Done      bool
	StartTime time.Time
	UfsTotal  string
	Err       error
}

MetadataSyncResult describes result for asynchronous metadata sync

type Mounts

type Mounts struct {
	Master            map[string]string `yaml:"master"`
	WorkersAndClients map[string]string `yaml:"workersAndClients"`
}

type Resource

type Resource struct {
	CPU    string `yaml:"cpu"`
	Memory string `yaml:"memory"`
}

type Resources

type Resources struct {
	Limits   Resource `yaml:"limits"`
	Requests Resource `yaml:"requests"`
}

type Worker

type Worker struct {
	Resources        Resources         `yaml:"resources"`
	NodeSelector     map[string]string `yaml:"nodeSelector,omitempty"`
	WorkerProperties map[string]string `yaml:"properties"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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