archive

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Copyright (C) NHR@FAU, University Erlangen-Nuremberg. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.

Copyright (C) NHR@FAU, University Erlangen-Nuremberg. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.

Copyright (C) NHR@FAU, University Erlangen-Nuremberg. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.

Copyright (C) NHR@FAU, University Erlangen-Nuremberg. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.

Copyright (C) NHR@FAU, University Erlangen-Nuremberg. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.

Copyright (C) NHR@FAU, University Erlangen-Nuremberg. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.

Index

Constants

View Source
const Version uint64 = 1

Variables

View Source
var Clusters []*schema.Cluster

Functions

func AssignSubCluster

func AssignSubCluster(job *schema.BaseJob) error

AssignSubCluster sets the `job.subcluster` property of the job based on its cluster and resources.

func DecodeCluster

func DecodeCluster(r io.Reader) (*schema.Cluster, error)

func DecodeJobData

func DecodeJobData(r io.Reader, k string) (schema.JobData, error)

func DecodeJobMeta

func DecodeJobMeta(r io.Reader) (*schema.JobMeta, error)

func EncodeJobData

func EncodeJobData(w io.Writer, d *schema.JobData) error

func EncodeJobMeta

func EncodeJobMeta(w io.Writer, d *schema.JobMeta) error

func GetCluster

func GetCluster(cluster string) *schema.Cluster

func GetMetricConfig

func GetMetricConfig(cluster, metric string) *schema.MetricConfig

func GetStatistics

func GetStatistics(job *schema.Job) (map[string]schema.JobStatistics, error)

func GetSubCluster

func GetSubCluster(cluster, subcluster string) (*schema.SubCluster, error)

func GetSubClusterByNode

func GetSubClusterByNode(cluster, hostname string) (string, error)

func Init

func Init(rawConfig json.RawMessage, disableArchive bool) error

func LoadAveragesFromArchive

func LoadAveragesFromArchive(
	job *schema.Job,
	metrics []string,
	data [][]schema.Float,
) error

Helper to metricdata.LoadAverages().

func UpdateMetadata added in v1.3.0

func UpdateMetadata(job *schema.Job, metadata map[string]string) error

If the job is archived, find its `meta.json` file and override the Metadata in that JSON file. If the job is not archived, nothing is done.

func UpdateTags

func UpdateTags(job *schema.Job, tags []*schema.Tag) error

If the job is archived, find its `meta.json` file and override the tags list in that JSON file. If the job is not archived, nothing is done.

Types

type ArchiveBackend

type ArchiveBackend interface {
	Init(rawConfig json.RawMessage) (uint64, error)

	Info()

	Exists(job *schema.Job) bool

	LoadJobMeta(job *schema.Job) (*schema.JobMeta, error)

	LoadJobData(job *schema.Job) (schema.JobData, error)

	LoadClusterCfg(name string) (*schema.Cluster, error)

	StoreJobMeta(jobMeta *schema.JobMeta) error

	ImportJob(jobMeta *schema.JobMeta, jobData *schema.JobData) error

	GetClusters() []string

	CleanUp(jobs []*schema.Job)

	Move(jobs []*schema.Job, path string)

	Clean(before int64, after int64)

	Compress(jobs []*schema.Job)

	CompressLast(starttime int64) int64

	Iter(loadMetricData bool) <-chan JobContainer
}

func GetHandle

func GetHandle() ArchiveBackend

type FsArchive

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

func (*FsArchive) Clean

func (fsa *FsArchive) Clean(before int64, after int64)

func (*FsArchive) CleanUp

func (fsa *FsArchive) CleanUp(jobs []*schema.Job)

func (*FsArchive) Compress

func (fsa *FsArchive) Compress(jobs []*schema.Job)

func (*FsArchive) CompressLast

func (fsa *FsArchive) CompressLast(starttime int64) int64

func (*FsArchive) Exists

func (fsa *FsArchive) Exists(job *schema.Job) bool

func (*FsArchive) GetClusters

func (fsa *FsArchive) GetClusters() []string

func (*FsArchive) ImportJob

func (fsa *FsArchive) ImportJob(
	jobMeta *schema.JobMeta,
	jobData *schema.JobData) error

func (*FsArchive) Info

func (fsa *FsArchive) Info()

func (*FsArchive) Init

func (fsa *FsArchive) Init(rawConfig json.RawMessage) (uint64, error)

func (*FsArchive) Iter

func (fsa *FsArchive) Iter(loadMetricData bool) <-chan JobContainer

func (*FsArchive) LoadClusterCfg

func (fsa *FsArchive) LoadClusterCfg(name string) (*schema.Cluster, error)

func (*FsArchive) LoadJobData

func (fsa *FsArchive) LoadJobData(job *schema.Job) (schema.JobData, error)

func (*FsArchive) LoadJobMeta

func (fsa *FsArchive) LoadJobMeta(job *schema.Job) (*schema.JobMeta, error)

func (*FsArchive) Move

func (fsa *FsArchive) Move(jobs []*schema.Job, path string)

func (*FsArchive) StoreJobMeta

func (fsa *FsArchive) StoreJobMeta(jobMeta *schema.JobMeta) error

type FsArchiveConfig

type FsArchiveConfig struct {
	Path string `json:"path"`
}

type JobContainer

type JobContainer struct {
	Meta *schema.JobMeta
	Data *schema.JobData
}

type NLExprIntRange

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

type NLExprIntRanges

type NLExprIntRanges []NLExprIntRange

type NLExprString

type NLExprString string

type NodeList

type NodeList [][]interface {
	// contains filtered or unexported methods
}

func ParseNodeList

func ParseNodeList(raw string) (NodeList, error)

func (*NodeList) Contains

func (nl *NodeList) Contains(name string) bool

func (*NodeList) NodeCount

func (nl *NodeList) NodeCount() int

func (*NodeList) PrintList

func (nl *NodeList) PrintList() []string

type S3Archive

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

type S3ArchiveConfig

type S3ArchiveConfig struct {
	Path string `json:"filePath"`
}

Jump to

Keyboard shortcuts

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