private void checkMetrics()

in dbeam-core/src/main/java/com/spotify/dbeam/jobs/JdbcAvroJob.java [170:182]


  private void checkMetrics(PipelineResult pipelineResult) throws FailedValidationException {
    final Map<String, Long> metrics = MetricsHelper.getMetrics(pipelineResult);
    if (!this.dataOnly) {
      BeamHelper.saveMetrics(metrics, output);
    }
    final Long recordCount = metrics.getOrDefault(JdbcAvroMetering.RECORD_COUNT_METRIC_NAME, 0L);
    if (recordCount < this.minRows) {
      throw new FailedValidationException(
          String.format(
              "Unexpected number of rows in the output: got %d, expecting at least %d",
              recordCount, this.minRows));
    }
  }