Apache Beam Counter/Metrics not available in Flink WebUI

前端 未结 2 940
情深已故
情深已故 2021-02-20 06:08

I\'m using Flink 1.4.1 and Beam 2.3.0, and would like to know is it possible to have metrics available in Flink WebUI (or anywhere at all), as in Dataflow WebUI ?

I\'ve

2条回答
  •  無奈伤痛
    2021-02-20 06:30

    If your pipeline is running in detached mode, metrics are not supported to be queried. Refer this.

    public class FlinkDetachedRunnerResult implements PipelineResult {
    
      FlinkDetachedRunnerResult() {}
    
      @Override
      public State getState() {
        return State.UNKNOWN;
      }
    
      @Override
      public MetricResults metrics() {
        throw new UnsupportedOperationException("The FlinkRunner does not currently support metrics.");
      }
    
      @Override
      public State cancel() throws IOException {
        throw new UnsupportedOperationException("Cancelling is not yet supported.");
      }
    
      @Override
      public State waitUntilFinish() {
        return State.UNKNOWN;
      }
    
      @Override
      public State waitUntilFinish(Duration duration) {
        return State.UNKNOWN;
      }
    
      @Override
      public String toString() {
        return "FlinkDetachedRunnerResult{}";
      }
    }
    

    However, I was able to view the metrics using slf4j reporter

提交回复
热议问题