You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/04/08 11:57:00 UTC

[jira] [Work logged] (BEAM-4775) JobService should support returning metrics

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

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

                Author: ASF GitHub Bot
            Created on: 08/Apr/19 11:56
            Start Date: 08/Apr/19 11:56
    Worklog Time Spent: 10m 
      Work Description: lgajowy commented on pull request #7934: [BEAM-4775] add GetJobMetrics RPC
URL: https://github.com/apache/beam/pull/7934#discussion_r273008469
 
 

 ##########
 File path: runners/java-fn-execution/src/main/java/org/apache/beam/runners/fnexecution/jobsubmission/InMemoryJobService.java
 ##########
 @@ -330,6 +335,29 @@ public void describePipelineOptions(
     }
   }
 
+  @Override
+  public void getJobMetrics(
+      GetJobMetricsRequest request, StreamObserver<GetJobMetricsResponse> responseObserver) {
+    String invocationId = request.getJobId();
+    LOG.info("Running getJobMetrics for {}", invocationId);
+    try {
+      JobInvocation invocation = getInvocation(invocationId);
+      LOG.info("Found job invocation for metrics: {}", invocation);
+      MetricResults metrics = invocation.getMetrics();
 
 Review comment:
   @ryan-williams @ajamato I'd like to get more context here. LMK if I'm missing something.  
   
   Here the `JobInvocation` uses `PipelineResult` that contains a `MetricsResult` rather than `MonitoringInfos`. What would be the best way of getting `MonitoringInfos` in JobInvocation?
   
   Is implementing a `MonitoringInfo portableMetrics()` method in `JobServicePipelineResult` and setting `FutureCallback` with `JobServicePipelineResult instead of `PipelineResult` a good idea? We could use it to call: 
   
   `MonitoringInfo metrics = pipelineResult.portableMetrics();`
   
   instead of : 
   
   `MetricResults metrics = pipelineResult.metrics();`
   
   I don't like that we'd have 2 separate methods for `metrics()` both returning different types but currently I don't see other way to 
   > make the interface on JobInvocation return MonitoringInfos
   
   WDYT?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

    Worklog Id:     (was: 224297)
    Time Spent: 39h 20m  (was: 39h 10m)

> 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
>              Labels: triaged
>          Time Spent: 39h 20m
>  Remaining Estimate: 0h
>
> Design doc: [https://s.apache.org/get-metrics-api].
> Further discussion is ongoing on [this doc|https://docs.google.com/document/d/1m83TsFvJbOlcLfXVXprQm1B7vUakhbLZMzuRrOHWnTg/edit?ts=5c826bb4#heading=h.faqan9rjc6dm].
> We want to report job metrics back to the portability harness from the runner harness, for displaying to users.
> h1. Relevant PRs in flight:
> h2. Ready for Review:
>  * [#8022|https://github.com/apache/beam/pull/8022]: correct the Job RPC protos from [#8018|https://github.com/apache/beam/pull/8018].
> h2. Iterating / Discussing:
>  * [#7971|https://github.com/apache/beam/pull/7971]: Flink portable metrics: get ptransform from MonitoringInfo, not stage name
>  ** this is a simpler, Flink-specific PR that is basically duplicated inside each of the following two, so may be worth trying to merge in first
>  * #[7915|https://github.com/apache/beam/pull/7915]: use MonitoringInfo data model in Java SDK metrics
>  * [#7868|https://github.com/apache/beam/pull/7868]: MonitoringInfo URN tweaks
> h2. Merged
>  * [#8018|https://github.com/apache/beam/pull/8018]: add job metrics RPC protos
>  * [#7867|https://github.com/apache/beam/pull/7867]: key MetricResult by a MetricKey
>  * [#7938|https://github.com/apache/beam/pull/7938]: move MonitoringInfo protos to model/pipeline module
>  * [#7883|https://github.com/apache/beam/pull/7883]: Add MetricQueryResults.allMetrics() helper
>  * [#7866|https://github.com/apache/beam/pull/7866]: move function helpers from fn-harness to sdks/java/core
>  * [#7890|https://github.com/apache/beam/pull/7890]: consolidate MetricResult implementations
> h2. Closed
>  * [#7934|https://github.com/apache/beam/pull/7934]: job metrics RPC + SDK support
>  * [#7876|https://github.com/apache/beam/pull/7876]: Clean up metric protos; support integer distributions, gauges



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