From 22d91c011eb4b3fd88ef4199db93d8c7e3991b86 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Fri, 8 Mar 2019 14:15:18 +0100 Subject: [PATCH] [BEAM-4775] Add GetJobMetrics RPC. --- .../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 4a0ecea05226..a3d88a9f48be 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.