pub struct IncrementalAnalysisRunner { /* private fields */ }Expand description
Orchestrates incremental analysis across partitions.
The runner maintains a collection of analyzers and manages their state across data partitions, enabling efficient incremental computation.
Implementations§
Source§impl IncrementalAnalysisRunner
impl IncrementalAnalysisRunner
Sourcepub fn new(state_store: Box<dyn StateStore>) -> Self
pub fn new(state_store: Box<dyn StateStore>) -> Self
Creates a new incremental analysis runner
Sourcepub fn with_config(
state_store: Box<dyn StateStore>,
config: IncrementalConfig,
) -> Self
pub fn with_config( state_store: Box<dyn StateStore>, config: IncrementalConfig, ) -> Self
Creates a new incremental analysis runner with custom config
Sourcepub fn add_analyzer<A>(self, analyzer: A) -> Selfwhere
A: Analyzer + 'static,
A::State: Serialize + for<'de> Deserialize<'de>,
A::Metric: Into<MetricValue>,
pub fn add_analyzer<A>(self, analyzer: A) -> Selfwhere
A: Analyzer + 'static,
A::State: Serialize + for<'de> Deserialize<'de>,
A::Metric: Into<MetricValue>,
Adds an analyzer to the runner
Sourcepub async fn analyze_partition(
&self,
ctx: &SessionContext,
partition: &str,
) -> AnalyzerResult<AnalyzerContext>
pub async fn analyze_partition( &self, ctx: &SessionContext, partition: &str, ) -> AnalyzerResult<AnalyzerContext>
Sourcepub async fn analyze_incremental(
&self,
ctx: &SessionContext,
partition: &str,
) -> AnalyzerResult<AnalyzerContext>
pub async fn analyze_incremental( &self, ctx: &SessionContext, partition: &str, ) -> AnalyzerResult<AnalyzerContext>
Analyzes new data and merges with existing partition state
This method loads the existing state for a partition, computes new state from the provided data, merges them, and saves the updated state.
§Arguments
ctx- DataFusion context with new datapartition- Partition identifier
Sourcepub async fn analyze_partitions(
&self,
partitions: &[String],
) -> AnalyzerResult<AnalyzerContext>
pub async fn analyze_partitions( &self, partitions: &[String], ) -> AnalyzerResult<AnalyzerContext>
Sourcepub fn analyzer_count(&self) -> usize
pub fn analyzer_count(&self) -> usize
Returns the number of analyzers configured
Sourcepub async fn list_partitions(&self) -> AnalyzerResult<Vec<String>>
pub async fn list_partitions(&self) -> AnalyzerResult<Vec<String>>
Lists all stored partitions
Sourcepub async fn delete_partition(&self, partition: &str) -> AnalyzerResult<()>
pub async fn delete_partition(&self, partition: &str) -> AnalyzerResult<()>
Deletes a partition’s stored state
Auto Trait Implementations§
impl Freeze for IncrementalAnalysisRunner
impl !RefUnwindSafe for IncrementalAnalysisRunner
impl Send for IncrementalAnalysisRunner
impl Sync for IncrementalAnalysisRunner
impl Unpin for IncrementalAnalysisRunner
impl !UnwindSafe for IncrementalAnalysisRunner
Blanket Implementations§
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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