ASF GitHub Bot logged work on BEAM-2732:

                Author: ASF GitHub Bot
            Created on: 16/Apr/18 20:38
            Start Date: 16/Apr/18 20:38
    Worklog Time Spent: 10m 
      Work Description: pabloem commented on a change in pull request #4387: 
[BEAM-2732] Metrics rely on statesampler state
URL: https://github.com/apache/beam/pull/4387#discussion_r181877336

 File path: sdks/python/apache_beam/runners/direct/direct_runner.py
 @@ -338,6 +337,7 @@ def run_pipeline(self, pipeline):
     from apache_beam.runners.direct.transform_evaluator import \
     from apache_beam.testing.test_stream import TestStream
+    from apache_beam.metrics.execution import MetricsEnvironment
 Review comment:
   That is reasonable, and I agree. I've fixed this by having a lazy import in 
the metrics execution module.
   Currently, we're working under the idea that state sampler is the global 
context provider, so metrics rely on it. I'd think that makes it into a module 
that provides a service to other modules that require/handle context 
management. Though I'd agree that a more loose coupling would be quite 
desirable. Let me know what you think : )

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

Issue Time Tracking

    Worklog Id:     (was: 91477)
    Time Spent: 9h 40m  (was: 9.5h)

> State tracking in Python is inefficient and has duplicated code
> ---------------------------------------------------------------
>                 Key: BEAM-2732
>                 URL: https://issues.apache.org/jira/browse/BEAM-2732
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Pablo Estrada
>            Assignee: Pablo Estrada
>            Priority: Major
>          Time Spent: 9h 40m
>  Remaining Estimate: 0h
> e.g logging and metrics keep state separately. State tracking should be 
> unified.

This message was sent by Atlassian JIRA

Reply via email to