pub struct IngestJob {
pub dir: PathBuf,
pub spec: IngestJobSpec,
pub checkpoint: IngestCheckpoint,
}Fields§
§dir: PathBuf§spec: IngestJobSpec§checkpoint: IngestCheckpointImplementations§
Source§impl IngestJob
impl IngestJob
Sourcepub fn create(
dir: PathBuf,
source: IngestSourceKind,
encoding: IngestEncoding,
format: IngestRdfFormat,
mode: IngestMode,
segment_mib: Option<u64>,
output: &Path,
) -> Result<Self>
pub fn create( dir: PathBuf, source: IngestSourceKind, encoding: IngestEncoding, format: IngestRdfFormat, mode: IngestMode, segment_mib: Option<u64>, output: &Path, ) -> Result<Self>
Creates a new ingest job: makes the runs dir, writes the spec (source/encoding/format/mode/segment size), and initializes the checkpoint.
Sourcepub fn open(dir: PathBuf) -> Result<Self>
pub fn open(dir: PathBuf) -> Result<Self>
Reopens a job dir, loading spec and checkpoint; io errors propagate.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
true once the checkpoint phase is Complete.
Sourcepub fn write_spec(&self) -> Result<()>
pub fn write_spec(&self) -> Result<()>
Persists the job spec JSON atomically.
Sourcepub fn write_checkpoint(&self) -> Result<()>
pub fn write_checkpoint(&self) -> Result<()>
Persists the checkpoint JSON atomically.
Sourcepub fn set_phase(&mut self, phase: IngestJobPhase) -> Result<()>
pub fn set_phase(&mut self, phase: IngestJobPhase) -> Result<()>
Updates the checkpoint phase and persists it.
Sourcepub fn record_progress(
&mut self,
triples: u64,
uncompressed_bytes: u64,
quin_chunks: u64,
lex_runs: u64,
) -> Result<()>
pub fn record_progress( &mut self, triples: u64, uncompressed_bytes: u64, quin_chunks: u64, lex_runs: u64, ) -> Result<()>
Records bytes/quins processed plus optional window hash and persists the checkpoint.
Sourcepub fn mark_failed(&mut self, err: impl ToString) -> Result<()>
pub fn mark_failed(&mut self, err: impl ToString) -> Result<()>
Marks the job failed with err and persists the checkpoint.
Sourcepub fn write_attestation(&self, att: &SourceAttestation) -> Result<()>
pub fn write_attestation(&self, att: &SourceAttestation) -> Result<()>
Writes the source attestation JSON atomically.
Sourcepub fn attestation_path(&self) -> PathBuf
pub fn attestation_path(&self) -> PathBuf
Path to the attestation file inside the job dir.
Sourcepub fn windows_path(&self) -> PathBuf
pub fn windows_path(&self) -> PathBuf
Path to the per-window hash file.
Sourcepub fn load_attestation(&self) -> Result<Option<SourceAttestation>>
pub fn load_attestation(&self) -> Result<Option<SourceAttestation>>
Reads the attestation JSON; Ok(None) when absent.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IngestJob
impl RefUnwindSafe for IngestJob
impl Send for IngestJob
impl Sync for IngestJob
impl Unpin for IngestJob
impl UnsafeUnpin for IngestJob
impl UnwindSafe for IngestJob
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more