[ https://issues.apache.org/jira/browse/BEAM-4775?focusedWorklogId=192528&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-192528 ]
ASF GitHub Bot logged work on BEAM-4775: ---------------------------------------- Author: ASF GitHub Bot Created on: 30/Jan/19 21:58 Start Date: 30/Jan/19 21:58 Worklog Time Spent: 10m Work Description: ryan-williams 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_r252455063 ########## File path: sdks/java/core/src/main/java/org/apache/beam/sdk/metrics/MetricQueryResults.java ########## @@ -18,24 +18,68 @@ package org.apache.beam.sdk.metrics; import com.google.auto.value.AutoValue; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.List; import org.apache.beam.sdk.annotations.Experimental; import org.apache.beam.sdk.annotations.Experimental.Kind; +import org.apache.beam.vendor.grpc.v1p13p1.com.google.common.collect.ImmutableList; /** * The results of a query for metrics. Allows accessing all of the metrics that matched the filter. */ @AutoValue @Experimental(Kind.METRICS) public abstract class MetricQueryResults { - /** Return the metric results for the getCounters that matched the filter. */ + /** Return the metric results for the counters that matched the filter. */ public abstract Iterable<MetricResult<Long>> getCounters(); - /** Return the metric results for the getDistributions that matched the filter. */ + /** Return the metric results for the distributions that matched the filter. */ public abstract Iterable<MetricResult<DistributionResult>> getDistributions(); - /** Return the metric results for the getGauges that matched the filter. */ + /** Return the metric results for the gauges that matched the filter. */ public abstract Iterable<MetricResult<GaugeResult>> getGauges(); + static <T> void printMetrics(String type, Iterable<MetricResult<T>> metrics, PrintStream ps) { Review comment: done ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 192528) Time Spent: 3h 40m (was: 3.5h) > 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: 3h 40m > 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)