Orca · API

orca.store

Where the executor records what it does.

Pipeline.execute reports every attempt it starts and finishes, and every step it skips, to a Store. MemoryStore only counts attempts, for a run that lives as long as its process; orca.state.PgStore writes them to Postgres, so a run can be resumed by another process.

Structs

MemoryStore

struct MemoryStore

Keeps nothing but the attempt counts.

Implements Movable, Store

__init__

def __init__(out self)

start_attempt

def start_attempt(mut self, step: String, partition: String, ord: Int, input: Span[UInt8]) -> Int

finish_attempt

def finish_attempt(mut self, step: String, partition: String, attempt: Int, status: String, output: Span[UInt8], error: String)

skip

def skip(mut self, step: String, partition: String, ord: Int, reason: String)

pinned_reads

def pinned_reads(mut self, step: String, partition: String) -> Dict[String, Int64]

recorder

def recorder(mut self) -> Recorder

set_log

def set_log(mut self, step: String, partition: String, attempt: Int, path: String)

Traits

Store

start_attempt

def start_attempt(mut self, step: String, partition: String, ord: Int, input: Span[UInt8]) -> Int

Records that step for partition is starting, with its encoded input, and returns the attempt's number (1 for the first). ord is the step's place in the run order.

finish_attempt

def finish_attempt(mut self, step: String, partition: String, attempt: Int, status: String, output: Span[UInt8], error: String)

Records how attempt attempt ended: succeeded with its encoded output, or failed with its error.

skip

def skip(mut self, step: String, partition: String, ord: Int, reason: String)

Records that step for partition didn't run, and why.

pinned_reads

def pinned_reads(mut self, step: String, partition: String) -> Dict[String, Int64]

The table snapshots earlier attempts of step for partition read, each table at its first attempt's snapshot.

recorder

def recorder(mut self) -> Recorder

What records the reads and commits of the attempt just started.

set_log

def set_log(mut self, step: String, partition: String, attempt: Int, path: String)

Records where attempt attempt writes its log.