You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by al...@apache.org on 2017/05/11 22:13:46 UTC
[1/2] beam git commit: Add internal comments to metrics
Repository: beam
Updated Branches:
refs/heads/master 463f1ee7b -> 0fd0409bf
Add internal comments to metrics
Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/4c28f054
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/4c28f054
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/4c28f054
Branch: refs/heads/master
Commit: 4c28f054e7d5d3ed1bdf372ce6dc0096c9ce56a6
Parents: 463f1ee
Author: Ahmet Altay <al...@google.com>
Authored: Thu May 11 14:50:33 2017 -0700
Committer: Ahmet Altay <al...@google.com>
Committed: Thu May 11 15:13:34 2017 -0700
----------------------------------------------------------------------
sdks/python/apache_beam/metrics/__init__.py | 1 +
sdks/python/apache_beam/metrics/cells.py | 2 ++
sdks/python/apache_beam/metrics/execution.py | 6 ++----
sdks/python/apache_beam/metrics/metric.py | 4 ++++
sdks/python/apache_beam/metrics/metricbase.py | 2 ++
5 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/beam/blob/4c28f054/sdks/python/apache_beam/metrics/__init__.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/metrics/__init__.py b/sdks/python/apache_beam/metrics/__init__.py
index 164d1a8..8ce7bbb 100644
--- a/sdks/python/apache_beam/metrics/__init__.py
+++ b/sdks/python/apache_beam/metrics/__init__.py
@@ -15,3 +15,4 @@
# limitations under the License.
#
from apache_beam.metrics.metric import Metrics
+from apache_beam.metrics.metric import MetricsFilter
http://git-wip-us.apache.org/repos/asf/beam/blob/4c28f054/sdks/python/apache_beam/metrics/cells.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/metrics/cells.py b/sdks/python/apache_beam/metrics/cells.py
index fbe3ad3..ba840f7 100644
--- a/sdks/python/apache_beam/metrics/cells.py
+++ b/sdks/python/apache_beam/metrics/cells.py
@@ -29,6 +29,8 @@ import threading
from apache_beam.metrics.metricbase import Counter
from apache_beam.metrics.metricbase import Distribution
+__all__ = ['DistributionResult']
+
class CellCommitState(object):
"""For internal use only; no backwards-compatibility guarantees.
http://git-wip-us.apache.org/repos/asf/beam/blob/4c28f054/sdks/python/apache_beam/metrics/execution.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/metrics/execution.py b/sdks/python/apache_beam/metrics/execution.py
index a06ec0c..675e49c 100644
--- a/sdks/python/apache_beam/metrics/execution.py
+++ b/sdks/python/apache_beam/metrics/execution.py
@@ -24,7 +24,7 @@ Available classes:
- MetricKey - Internal key for a metric.
- MetricResult - Current status of a metric's updates/commits.
-- MetricsEnvironment - Keeps track of MetricsContainer and other metrics
+- _MetricsEnvironment - Keeps track of MetricsContainer and other metrics
information for every single execution working thread.
- MetricsContainer - Holds the metrics of a single step and a single
unit-of-commit (bundle).
@@ -36,9 +36,7 @@ from apache_beam.metrics.cells import CounterCell, DistributionCell
class MetricKey(object):
- """
-
- Key used to identify instance of metric cell.
+ """Key used to identify instance of metric cell.
Metrics are internally keyed by the step name they associated with and
the name of the metric.
http://git-wip-us.apache.org/repos/asf/beam/blob/4c28f054/sdks/python/apache_beam/metrics/metric.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/metrics/metric.py b/sdks/python/apache_beam/metrics/metric.py
index 33db4e1..f99c0c4 100644
--- a/sdks/python/apache_beam/metrics/metric.py
+++ b/sdks/python/apache_beam/metrics/metric.py
@@ -30,6 +30,8 @@ from apache_beam.metrics.execution import MetricsEnvironment
from apache_beam.metrics.metricbase import Counter, Distribution
from apache_beam.metrics.metricbase import MetricName
+__all__ = ['Metrics', 'MetricsFilter']
+
class Metrics(object):
"""Lets users create/access metric objects during pipeline execution."""
@@ -146,6 +148,8 @@ class MetricResults(object):
class MetricsFilter(object):
"""Simple object to filter metrics results.
+ This class is experimental. No backwards-compatibility guarantees.
+
If filters by matching a result's step-namespace-name with three internal
sets. No execution/matching logic is added to this object, so that it may
be used to construct arguments as an RPC request. It is left for runners
http://git-wip-us.apache.org/repos/asf/beam/blob/4c28f054/sdks/python/apache_beam/metrics/metricbase.py
----------------------------------------------------------------------
diff --git a/sdks/python/apache_beam/metrics/metricbase.py b/sdks/python/apache_beam/metrics/metricbase.py
index fa0ca75..699f29c 100644
--- a/sdks/python/apache_beam/metrics/metricbase.py
+++ b/sdks/python/apache_beam/metrics/metricbase.py
@@ -30,6 +30,8 @@ Available classes:
- MetricName - Namespace and name used to refer to a Metric.
"""
+__all__ = ['Metric', 'Counter', 'Distribution', 'MetricName']
+
class MetricName(object):
"""The name of a metric.
[2/2] beam git commit: This closes #3099
Posted by al...@apache.org.
This closes #3099
Project: http://git-wip-us.apache.org/repos/asf/beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/0fd0409b
Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/0fd0409b
Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/0fd0409b
Branch: refs/heads/master
Commit: 0fd0409bfeacb3e32385c2ae4f2b5a7ccc8afb78
Parents: 463f1ee 4c28f05
Author: Ahmet Altay <al...@google.com>
Authored: Thu May 11 15:13:38 2017 -0700
Committer: Ahmet Altay <al...@google.com>
Committed: Thu May 11 15:13:38 2017 -0700
----------------------------------------------------------------------
sdks/python/apache_beam/metrics/__init__.py | 1 +
sdks/python/apache_beam/metrics/cells.py | 2 ++
sdks/python/apache_beam/metrics/execution.py | 6 ++----
sdks/python/apache_beam/metrics/metric.py | 4 ++++
sdks/python/apache_beam/metrics/metricbase.py | 2 ++
5 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------