You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by ro...@apache.org on 2019/03/08 16:28:42 UTC

[beam] branch master updated: [BEAM-4775] Add GetJobMetrics RPC.

This is an automated email from the ASF dual-hosted git repository.

robertwb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 22d91c0  [BEAM-4775] Add GetJobMetrics RPC.
     new 4d20f37  Merge pull request #8018 [BEAM-4775] Add GetJobMetrics RPC.
22d91c0 is described below

commit 22d91c011eb4b3fd88ef4199db93d8c7e3991b86
Author: Robert Bradshaw <ro...@gmail.com>
AuthorDate: Fri Mar 8 14:15:18 2019 +0100

    [BEAM-4775] Add GetJobMetrics RPC.
---
 .../job-management/src/main/proto/beam_job_api.proto  | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/model/job-management/src/main/proto/beam_job_api.proto b/model/job-management/src/main/proto/beam_job_api.proto
index 4a0ecea..a3d88a9 100644
--- a/model/job-management/src/main/proto/beam_job_api.proto
+++ b/model/job-management/src/main/proto/beam_job_api.proto
@@ -32,6 +32,7 @@ option java_outer_classname = "JobApi";
 import "beam_runner_api.proto";
 import "endpoints.proto";
 import "google/protobuf/struct.proto";
+import "metrics.proto";
 
 // Job Service for running RunnerAPI pipelines
 service JobService {
@@ -54,6 +55,9 @@ service JobService {
   // Subscribe to a stream of state changes and messages from the job
   rpc GetMessageStream (JobMessagesRequest) returns (stream JobMessagesResponse);
 
+  // Fetch metrics for a given job
+  rpc GetJobMetrics (GetJobMetricsRequest) returns (GetJobMetricsResponse);
+
   // Get the supported pipeline options of the runner
   rpc DescribePipelineOptions (DescribePipelineOptionsRequest) returns (DescribePipelineOptionsResponse);
 }
@@ -179,6 +183,21 @@ message JobState {
 }
 
 
+message GetJobMetricsRequest {
+  string job_id = 1; // (required)
+}
+
+message GetJobMetricsResponse {
+  MetricsResults metrics = 1;
+}
+
+// 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;
+  org.apache.beam.model.pipeline.v1.MonitoringInfo committed = 2;
+}
+
+
 // DescribePipelineOptions provides metadata about the options supported by a runner.
 // It will be used by the SDK client to validate the options specified by or
 // list available options to the user.