operations

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlluxioFileUtils

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

func NewAlluxioFileUtils

func NewAlluxioFileUtils(podName string, containerName string, namespace string, log logr.Logger) AlluxioFileUtils

func (AlluxioFileUtils) CachedState

func (a AlluxioFileUtils) CachedState() (cached int64, err error)

func (AlluxioFileUtils) CleanCache

func (a AlluxioFileUtils) CleanCache(path string, timeout int32) (err error)

clean cache with a preset timeout of 60s

func (AlluxioFileUtils) Count

func (a AlluxioFileUtils) Count(alluxioPath string) (fileCount int64, folderCount int64, total int64, err error)

The count of the Alluxio Filesystem

func (AlluxioFileUtils) Du

func (a AlluxioFileUtils) Du(alluxioPath string) (ufs int64, cached int64, cachedPercentage string, err error)

func (AlluxioFileUtils) ExecMountScripts added in v1.0.0

func (a AlluxioFileUtils) ExecMountScripts() error

func (AlluxioFileUtils) FindUnmountedAlluxioPaths added in v0.7.0

func (a AlluxioFileUtils) FindUnmountedAlluxioPaths(alluxioPaths []string) ([]string, error)

func (AlluxioFileUtils) GetConf added in v0.4.0

func (a AlluxioFileUtils) GetConf(key string) (value string, err error)

Get Conf info of the Alluxio Engine

func (AlluxioFileUtils) GetFileCount added in v0.5.0

func (a AlluxioFileUtils) GetFileCount() (fileCount int64, err error)

file count of the Alluxio Filesystem (except folder) use "alluxio fsadmin report metrics" for better performance

func (AlluxioFileUtils) GetMountedAlluxioPaths added in v1.0.0

func (a AlluxioFileUtils) GetMountedAlluxioPaths() ([]string, error)

func (AlluxioFileUtils) IsMounted

func (a AlluxioFileUtils) IsMounted(alluxioPath string) (mounted bool, err error)

func (AlluxioFileUtils) LoadMetaData

func (a AlluxioFileUtils) LoadMetaData(alluxioPath string, sync bool) (err error)

/////////// Unused Alluxio File Util Functions ////////////// LoadMetaData loads the metadata.

func (AlluxioFileUtils) LoadMetadataWithoutTimeout added in v0.4.0

func (a AlluxioFileUtils) LoadMetadataWithoutTimeout(alluxioPath string) (err error)

Load the metadata without timeout

func (AlluxioFileUtils) MasterPodName added in v0.6.0

func (a AlluxioFileUtils) MasterPodName() (masterPodName string, err error)

func (AlluxioFileUtils) Mkdir

func (a AlluxioFileUtils) Mkdir(alluxioPath string) (err error)

func (AlluxioFileUtils) Mount

func (a AlluxioFileUtils) Mount(alluxioPath string,
	ufsPath string,
	options map[string]string,
	readOnly bool,
	shared bool) (err error)

func (AlluxioFileUtils) QueryMetaDataInfoIntoFile added in v0.5.0

func (a AlluxioFileUtils) QueryMetaDataInfoIntoFile(key KeyOfMetaDataFile, filename string) (value string, err error)

QueryMetaDataInfoIntoFile queries the metadata info file.

func (AlluxioFileUtils) Ready

func (a AlluxioFileUtils) Ready() (ready bool)

Check if the Alluxio is ready by running `alluxio fsadmin report` command

func (AlluxioFileUtils) ReportCapacity added in v0.5.0

func (a AlluxioFileUtils) ReportCapacity() (report string, err error)

ReportCapacity get alluxio capacity info by running `alluxio fsadmin report capacity` command

func (AlluxioFileUtils) ReportMetrics added in v0.5.0

func (a AlluxioFileUtils) ReportMetrics() (metrics string, err error)

ReportMetrics get alluxio metrics by running `alluxio fsadmin report metrics` command

func (AlluxioFileUtils) ReportSummary added in v0.4.0

func (a AlluxioFileUtils) ReportSummary() (summary string, err error)

Get summary info of the Alluxio Engine

func (AlluxioFileUtils) SyncLocalDir added in v0.3.0

func (a AlluxioFileUtils) SyncLocalDir(path string) (err error)

SyncLocalDir syncs local path by running command `du -sh <path>`. Under the circumstance where some NAS(e.g. NFS) is mounted on the `<path>`, the function will sync metadata of all files in the NAS. This is necessary for Alluxio to get consistent file metadata with UFS(i.e. NAS in this case).

func (AlluxioFileUtils) UnMount added in v0.6.0

func (a AlluxioFileUtils) UnMount(alluxioPath string) (err error)

type KeyOfMetaDataFile added in v0.5.0

type KeyOfMetaDataFile string
var (
	DatasetName KeyOfMetaDataFile = "dataset"
	Namespace   KeyOfMetaDataFile = "namespace"
	UfsTotal    KeyOfMetaDataFile = "ufstotal"
	FileNum     KeyOfMetaDataFile = "filenum"
)

Jump to

Keyboard shortcuts

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