Repository navigation
[BEAM-4775] Add GetJobMetrics RPC. - #8018
Conversation
ryan-williams
left a comment
There was a problem hiding this comment.
I think making it clear that GetJobMetricsResponse is a proto representation of SDKs' MetricResults is preferable, but I'll defer to you.
| } | ||
|
|
||
| // All metrics for a given job. Runners may support one or the other or both. | ||
| message GetJobMetricsResponse { |
There was a problem hiding this comment.
I started with this, per https://s.apache.org/get-metrics-api.
Converting between this proto and the SDK reprs (Java, Python) made it clear that we were actually introducing a proto representation of SDKs' MetricResults.
For example, MetricResultsProtos.java was originally GetJobMetricsResponseUtils.java:
public class GetJobMetricsResponseUtils {
public static GetJobMetricsResponse toProto( MetricResults metricResults) { … }
public static MetricResults fromProto(GetJobMetricsResponse resp) { … }
}
The signatures (and implementations) implied a broader purpose in ongoing discussions around metrics structures in the protos and SDKs.
Framing it as just part of this RPC obfuscated that role, to me.
There was a problem hiding this comment.
OK, re-introduced the proto.
There was a problem hiding this comment.
Thanks. Should it live in metrics.proto though?
There was a problem hiding this comment.
It is really specific to a particular job, but I don't feel that strongly.
| MetricsResults metrics = 1; | ||
| } | ||
|
|
||
| // All metrics for a given job. Runners may support one or the other or both. |
There was a problem hiding this comment.
Today, runners either populate ["attempted" only] or both; dunno if worth clarifying here.
There was a problem hiding this comment.
It's acceptable to populate committed only as well.
| } | ||
|
|
||
| // All metrics for a given job. Runners may support one or the other or both. | ||
| message GetJobMetricsResponse { |
|
|
||
| // All metrics for a given job. Runners may support one or the other or both. | ||
| message MetricsResults { | ||
| org.apache.beam.model.pipeline.v1.MonitoringInfo attempted = 1; |
There was a problem hiding this comment.
eh, these were supposed to be repeated, I think
This just adds the RPC to the Jobs API.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username).[BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replaceBEAM-XXXwith the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.Post-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.