Navigation

  • previous
  • PyFlink 1.15.dev0 documentation »

pyflink.metrics package¶

Module contents¶

class pyflink.metrics.MetricGroup[source]¶

Bases: abc.ABC

A MetricGroup is a named container for metrics and further metric subgroups.

Instances of this class can be used to register new metrics with Flink and to create a nested hierarchy based on the group names.

A MetricGroup is uniquely identified by it’s place in the hierarchy and name.

New in version 1.11.0.

add_group(name: str, extra: str = None) → pyflink.metrics.metricbase.MetricGroup[source]¶

Creates a new MetricGroup and adds it to this groups sub-groups.

If extra is not None, creates a new key-value MetricGroup pair. The key group is added to this group’s sub-groups, while the value group is added to the key group’s sub-groups. In this case, the value group will be returned and a user variable will be defined.

New in version 1.11.0.

counter(name: str) → pyflink.metrics.metricbase.Counter[source]¶

Registers a new Counter with Flink.

New in version 1.11.0.

distribution(name: str) → pyflink.metrics.metricbase.Distribution[source]¶

Registers a new Distribution with Flink.

New in version 1.11.0.

gauge(name: str, obj: Callable[[], int]) → None[source]¶

Registers a new Gauge with Flink.

New in version 1.11.0.

meter(name: str, time_span_in_seconds: int = 60) → pyflink.metrics.metricbase.Meter[source]¶

Registers a new Meter with Flink.

New in version 1.11.0.

class pyflink.metrics.Metric[source]¶

Bases: object

Base interface of a metric object.

New in version 1.11.0.

class pyflink.metrics.Counter(inner_counter)[source]¶

Bases: pyflink.metrics.metricbase.Metric

Counter metric interface. Allows a count to be incremented/decremented during pipeline execution.

New in version 1.11.0.

dec(n: int = 1)[source]¶

Decrement the current count by 1.

New in version 1.11.0.

get_count() → int[source]¶

Returns the current count.

New in version 1.11.0.

inc(n: int = 1)[source]¶

Increment the current count by the given value.

New in version 1.11.0.

class pyflink.metrics.Meter(inner_counter)[source]¶

Bases: pyflink.metrics.metricbase.Metric

Meter Metric interface.

Metric for measuring throughput.

New in version 1.11.0.

get_count() → int[source]¶

Get number of events marked on the meter.

New in version 1.11.0.

mark_event(value: int = 1)[source]¶

Mark occurrence of the specified number of events.

New in version 1.11.0.

class pyflink.metrics.Distribution(inner_distribution)[source]¶

Bases: pyflink.metrics.metricbase.Metric

Distribution Metric interface.

Allows statistics about the distribution of a variable to be collected during pipeline execution.

New in version 1.11.0.

update(value)[source]¶

Updates the distribution value.

New in version 1.11.0.

Logo

Table of Contents

  • pyflink.metrics package
    • Module contents

Previous topic

pyflink.datastream package

This Page

  • Show Source

Quick search

Navigation

  • previous
  • PyFlink 1.15.dev0 documentation »
© Copyright . Created using Sphinx 2.4.4.