[ 
https://issues.apache.org/jira/browse/BEAM-2732?focusedWorklogId=118554&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-118554
 ]

ASF GitHub Bot logged work on BEAM-2732:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Jul/18 01:34
            Start Date: 03/Jul/18 01:34
    Worklog Time Spent: 10m 
      Work Description: charlesccychen commented on a change in pull request 
#5356: [BEAM-2732][BEAM-4028] Logging relies on StateSampler for context
URL: https://github.com/apache/beam/pull/5356#discussion_r199662355
 
 

 ##########
 File path: sdks/python/apache_beam/runners/worker/statesampler.py
 ##########
 @@ -62,12 +64,22 @@ def __init__(self, prefix, counter_factory,
                sampling_period_ms=DEFAULT_SAMPLING_PERIOD_MS):
     self.states_by_name = {}
     self._prefix = prefix
-    self._counter_factory = counter_factory
+    self._counter_factory = counter_factory or CounterFactory()
 
 Review comment:
   It looks like the second branch is only used by tests.  Can we have the 
tests pass empty `CounterFactory()`s instead of adding this optional behavior 
in the actual code?

----------------------------------------------------------------
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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 118554)
    Time Spent: 16h 40m  (was: 16.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: 16h 40m
>  Remaining Estimate: 0h
>
> e.g logging and metrics keep state separately. State tracking should be 
> unified.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to