apache_beam.runners.direct.direct_metrics module
DirectRunner implementation of MetricResults. It is in charge not only of
responding to queries of current metrics, but also of keeping the common
state consistent.
- 
class apache_beam.runners.direct.direct_metrics.MetricAggregator[source]
- Bases: - object
 - For internal use only; no backwards-compatibility guarantees. - Base interface for aggregating metric data during pipeline execution. - 
- 
identity_element() → Any[source]
- Returns the identical element of an Aggregation. - 
- For the identity element, it must hold that
- Aggregator.combine(any_element, identity_element) == any_element. 
 
 - 
- 
combine(x: Any, y: Any) → Any[source]
 - 
- 
result(x: Any) → Any[source]
 
- 
class apache_beam.runners.direct.direct_metrics.CounterAggregator[source]
- Bases: - MetricAggregator
 - For internal use only; no backwards-compatibility guarantees. - Aggregator for Counter metric data during pipeline execution. - Values aggregated should be - intobjects.
 - 
- 
static identity_element() → int[source]
 - 
- 
combine(x: SupportsInt, y: SupportsInt) → int[source]
 - 
- 
result(x: SupportsInt) → int[source]
 
- 
class apache_beam.runners.direct.direct_metrics.GenericAggregator(data_class)[source]
- Bases: - MetricAggregator
 - 
- 
identity_element()[source]
 - 
- 
combine(x, y)[source]
 - 
- 
result(x)[source]
 
- 
class apache_beam.runners.direct.direct_metrics.DirectMetrics[source]
- Bases: - MetricResults
 - 
- 
commit_logical(bundle, updates)[source]
 - 
- 
commit_physical(bundle, updates)[source]
 - 
- 
update_physical(bundle, updates)[source]
 - 
- 
query(filter=None)[source]
 
- 
class apache_beam.runners.direct.direct_metrics.DirectMetric(aggregator)[source]
- Bases: - object
 - Keeps a consistent state for a single metric. - It keeps track of the metric’s physical and logical updates.
It’s thread safe. - 
- 
commit_logical(bundle, update)[source]
 - 
- 
commit_physical(bundle, update)[source]
 - 
- 
update_physical(bundle, update)[source]
 - 
 -