common

package
v0.0.0-...-b4f3a91 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MediumTypeMEM use
	MediumTypeMEM v1alpha1.MediumType = "MEM"
	// MediumTypeSSD use
	MediumTypeSSD v1alpha1.MediumType = "SSD"
	// MediumTypeHDD use
	MediumTypeHDD v1alpha1.MediumType = "HDD"
)
View Source
const (
	// SampleSetNone After create SampleSet CR, before create PV/PVC
	SampleSetNone v1alpha1.SampleSetPhase = ""
	// SampleSetBound After create PV/PVC, before create runtime daemon set
	SampleSetBound v1alpha1.SampleSetPhase = "Bound"
	// SampleSetMount After create runtime daemon set, before data syncing.
	SampleSetMount v1alpha1.SampleSetPhase = "Mount"
	// SampleSetSyncing syncing data to cache engine backend
	SampleSetSyncing v1alpha1.SampleSetPhase = "Syncing"
	// SampleSetSyncFailed if sync job is fail
	SampleSetSyncFailed v1alpha1.SampleSetPhase = "SyncFailed"
	// SampleSetPartialReady means
	SampleSetPartialReady v1alpha1.SampleSetPhase = "PartialReady"
	// SampleSetReady After data sync finish and SampleSet is ready to be use
	SampleSetReady v1alpha1.SampleSetPhase = "Ready"
)
View Source
const (
	SampleJobNone      v1alpha1.SampleJobPhase = ""
	SampleJobPending   v1alpha1.SampleJobPhase = "Pending"
	SampleJobRunning   v1alpha1.SampleJobPhase = "Running"
	SampleJobSucceeded v1alpha1.SampleJobPhase = "Succeeded"
	SampleJobFailed    v1alpha1.SampleJobPhase = "Failed"
)
View Source
const (
	JobTypeRmr    v1alpha1.SampleJobType = "rmr"
	JobTypeSync   v1alpha1.SampleJobType = "sync"
	JobTypeClear  v1alpha1.SampleJobType = "clear"
	JobTypeWarmup v1alpha1.SampleJobType = "warmup"
)
View Source
const (
	CmdRoot   = "nuwa"
	CmdServer = "server"
	// CmdSync defined the command to sync data and metadata
	// from source to destination for job or cronjob
	CmdSync   = "sync"
	CmdWarmup = "warmup"
	CmdRmr    = "rmr"
	CmdClear  = "clear"
)
View Source
const (
	ErrorDriverNotExist    = "ErrorDriverNotExist"
	ErrorSecretNotExist    = "ErrorSecretNotExist"
	ErrorJobTypeNotSupport = "ErrorJobTypeNotSupport"
	ErrorSampleSetNotExist = "ErrorSampleSetNotExist"
)
View Source
const (
	PaddleLabel         = "paddlepaddle.org"
	PaddleOperatorLabel = "paddle-operator"
)
View Source
const (
	IndexerKeyEvent     = "eventIndexerKey"
	IndexerKeyRuntime   = "runtimeIndexerKey"
	IndexerKeyPaddleJob = "paddleJobIndexerKey"
)
View Source
const (
	RuntimeContainerName  = "runtime"
	RuntimeCacheMountPath = "/cache"
	RuntimeDateMountPath  = "/mnt"
	RuntimeCacheInterval  = 30
)
View Source
const (
	RuntimeServicePort = 7716
	RuntimeServiceName = "service"
)
View Source
const (
	PathUploadPrefix  = "/upload"
	PathServerRoot    = "/runtime"
	PathCacheStatus   = "/cacheStatus"
	PathSyncResult    = "/syncResult"
	PathClearResult   = "/clearResult"
	PathRmrResult     = "/rmrResult"
	PathWarmupResult  = "/warmupResult"
	PathSyncOptions   = "/syncOptions"
	PathClearOptions  = "/clearOptions"
	PathRmrOptions    = "/rmrOptions"
	PathWarmupOptions = "/warmupOptions"
	FilePathCacheInfo = "cacheInfo.json"
	TerminateSignal   = "terminate"

	WarmupDirPath      = "/.warmup"
	WarmupTotalFile    = "/total"
	WarmupDonePrefix   = "/done"
	WarmupFilePrefix   = "/file"
	WarmupTmpPrefix    = "/.file"
	WarmupWorkerPrefix = "/worker"
)
View Source
const (
	// StorageBOS Baidu Cloud Object Storage
	StorageBOS = "bos"
	// StorageS3 Amazon S3
	StorageS3 = "s3"
	// StorageHDFS Hadoop File System (HDFS)
	StorageHDFS = "hdfs"
	// StorageGCS Google Cloud Storage
	StorageGCS = "gs"
	// StorageWASB Windows Azure Blob Storage
	StorageWASB = "wasb"
	// StorageOSS Aliyun OSS
	StorageOSS = "oss"
	// StorageCOS Tencent Cloud COS
	StorageCOS = "cos"
	// StorageKS3 KSYun KS3
	StorageKS3 = "ks3"
	// StorageUFILE UCloud UFile
	StorageUFILE = "ufile"
	// StorageQingStor Qingcloud QingStor
	StorageQingStor = "qingstor"
	// StorageJSS JCloud Object Storage
	StorageJSS = "jss"
	// StorageQiNiu Qiniu
	StorageQiNiu = "qiniu"
	// StorageB2 Backblaze B2
	StorageB2 = "b2"
	// StorageSpace Digital Ocean Space
	StorageSpace = "space"
	// StorageOBS Huawei Object Storage Service
	StorageOBS = "obs"
	// StorageOOS CTYun OOS
	StorageOOS = "oos"
	// StorageSCW Scaleway Object Storage
	StorageSCW = "scw"
	// StorageMinio MinIO
	StorageMinio = "minio"
	// StorageSCS Sina Cloud Storage
	StorageSCS = "scs"
	// StorageIBMCOS IBM Cloud Object Storage
	StorageIBMCOS = "ibmcos"
	// StorageWASABI Wasabi Cloud Object Storage
	StorageWASABI = "wasabi"
	// StorageMSS Meituan Storage Service
	StorageMSS = "mss"
	// StorageNOS NetEase Object Storage
	StorageNOS = "nos"
	// StorageEOS ECloud (China Mobile Cloud) Object Storage
	StorageEOS = "eos"
	// StorageSpeedy SpeedyCloud Object Storage
	StorageSpeedy = "speedy"
	// StorageCeph Ceph RADOS
	StorageCeph = "ceph"
	// StorageSwift Swift
	StorageSwift = "swift"
	// StorageWebDAV WebDAV
	StorageWebDAV = "webdav"
	// StorageRedis redis
	StorageRedis = "redis"
	// StorageTiKV tikv
	StorageTiKV = "tikv"
	// StorageFile file
	StorageFile = "file"
)
View Source
const (
	StrategyRandom   = "random"
	StrategySequence = "sequence"
)
View Source
const ResourceStorage = "10Pi"

Variables

This section is empty.

Functions

This section is empty.

Types

type JobResult

type JobResult struct {
	Status  JobStatus `json:"status,omitempty"`
	Message string    `json:"message,omitempty"`
}

type JobStatus

type JobStatus string
const (
	JobStatusRunning JobStatus = "running"
	JobStatusSuccess JobStatus = "success"
	JobStatusFail    JobStatus = "fail"
)

type PodNameIndex

type PodNameIndex struct {
	Name  string
	Index int
}

type ReconcileContext

type ReconcileContext struct {
	client.Client
	Ctx      context.Context
	Req      *ctrl.Request
	Log      logr.Logger
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

type RequestContext

type RequestContext struct {
	SampleSet *v1alpha1.SampleSet
	SampleJob *v1alpha1.SampleJob

	Req         *ctrl.Request
	Secret      *v1.Secret
	PV          *v1.PersistentVolume
	Service     *v1.Service
	StatefulSet *appv1.StatefulSet
}

type RootCmdOptions

type RootCmdOptions struct {
	// container storage interface driver name,
	// the value of it should in v1alpha1.DriverName
	Driver string `json:"driver,omitempty"`
	// configures the logger to use a Zap development config
	Development bool `json:"development,omitempty"`
}

RootCmdOptions the

type ServerOptions

type ServerOptions struct {
	// the port for runtime service
	ServerPort int `json:"serverPort,omitempty"`
	// the root dir static file service
	ServerDir string `json:"serverDir,omitempty"`
	// cache data directories that mounted to the container
	CacheDirs []string `json:"cacheDirs,omitempty"`
	// the sample set data path mounted to the container
	DataDir string `json:"dataDir,omitempty"`
	// time interval for writing cache status to specified path
	Interval int64 `json:"interval,omitempty"`
	// The timeout period of the command to collect cached data information
	Timeout int64 `json:"timeout,omitempty"`
}

Jump to

Keyboard shortcuts

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