Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster interface { pool.Pool // Allocate reserves an alloc of at least min, and at most max resources. // The cluster may scale elastically in order to meet this demand. // Labels are passed down to the underlying pool. Allocate(ctx context.Context, req reflow.Requirements, labels pool.Labels) (pool.Alloc, error) // CanAllocate returns whether this cluster can allocate the given amount of resources. CanAllocate(reflow.Resources) (bool, error) // MaxAlloc returns the max resources which can be obtained in a single alloc from this cluster. MaxAlloc() reflow.Resources // GetName returns the name of the cluster GetName() string }
Cluster is a kind of pool.Pool that also allows the user to directly reserve an alloc. This way, the cluster can be responsive to demand.
type Runner ¶
type Runner struct { // State contains the state of the run. The user can serialize // this in order to resume runs. State flow.EvalConfig // Flow is the flow to be evaluated. Flow *flow.Flow // Type is the type of output. When Type is nil, it is taken to be // (legacy) reflow.Fileset. Type *types.T // Transferer is the transfer manager used for node-to-node data // transfers. Transferer reflow.Transferer // Labels are the set of labels affiliated with this run. Labels pool.Labels // Cmdline is a debug string with program name, params and args. Cmdline string }
A Runner is responsible for evaluating a flow.Flow on a cluster.
type State ¶
type State struct { // ID is this run's global ID. ID taskdb.RunID // Program stores the reflow program name. Program string // Params is the run parameters Params map[string]string // Args stores the run arguments Args []string // Phase holds the current phase of the run. Phase Phase // Value contains the result of the evaluation, // rendered as a string. // TODO(marius): serialize the value into JSON. Result string // Err contains runtime errors. Err *errors.Error // AttemptNumber is the evaluation attempt number. AttemptNumber int // LastTry is the timestamp of the last evaluation attempt. LastTry time.Time // Created is the time of the run's creation. Created time.Time // Completion is the time of the run's completion. Completion time.Time // TotalResources stores the total amount of resources used // by this run. Note that the resources are in resource-minutes. TotalResources reflow.Resources }
State contains the full state of a run. A State can be serialized and later recovered in order to resume a run.
type TracingCluster ¶
type TracingCluster struct {
Cluster
}
TracingCluster is a cluster that traces the actions of an underlying cluster manager.
Click to show internal directories.
Click to hide internal directories.