[
https://issues.apache.org/jira/browse/BEAM-4775?focusedWorklogId=191790&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-191790
]
ASF GitHub Bot logged work on BEAM-4775:
----------------------------------------
Author: ASF GitHub Bot
Created on: 29/Jan/19 16:44
Start Date: 29/Jan/19 16:44
Worklog Time Spent: 10m
Work Description: mxm commented on pull request #7656: [BEAM-4775]
Metrics improvements: make wordcount.py work with attempted metrics
URL: https://github.com/apache/beam/pull/7656#discussion_r251915919
##########
File path: sdks/python/apache_beam/metrics/execution.py
##########
@@ -122,6 +122,13 @@ def __repr__(self):
return 'MetricResult(key={}, committed={}, attempted={})'.format(
self.key, str(self.committed), str(self.attempted))
+ @property
+ def result(self):
+ """Short-hand for falling back to attempted metrics if it seems that
+ committed was not populated (e.g. due to not being supported on a given
+ runner"""
+ return self.committed if self.committed else self.attempted
Review comment:
Stupid question: What is the difference between the two?
----------------------------------------------------------------
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: 191790)
Time Spent: 1.5h (was: 1h 20m)
> JobService should support returning metrics
> -------------------------------------------
>
> Key: BEAM-4775
> URL: https://issues.apache.org/jira/browse/BEAM-4775
> Project: Beam
> Issue Type: Bug
> Components: beam-model
> Reporter: Eugene Kirpichov
> Assignee: Ryan Williams
> Priority: Major
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> [https://github.com/apache/beam/blob/master/model/job-management/src/main/proto/beam_job_api.proto]
> currently doesn't appear to have a way for JobService to return metrics to a
> user, even though
> [https://github.com/apache/beam/blob/master/model/fn-execution/src/main/proto/beam_fn_api.proto]
> includes support for reporting SDK metrics to the runner harness.
>
> Metrics are apparently necessary to run any ValidatesRunner tests because
> PAssert needs to validate that the assertions succeeded. However, this
> statement should be double-checked: perhaps it's possible to somehow work
> with PAssert without metrics support.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)