vthinkxie commented on a change in pull request #10238: [FLINK-8949] Add dedicated watermarks metric retrieval endpoint URL: https://github.com/apache/flink/pull/10238#discussion_r351960228
########## File path: flink-runtime-web/web-dashboard/src/app/pages/job/overview/job-overview.component.ts ########## @@ -66,28 +65,10 @@ export class JobOverviewComponent implements OnInit, OnDestroy { mergeWithWatermarks(nodes: NodesItemCorrectInterface[]): Observable<NodesItemCorrectInterface[]> { return forkJoin( nodes.map(node => { - const listOfMetricId = []; let lowWatermark = NaN; - for (let i = 0; i < node.parallelism; i++) { - listOfMetricId.push(`${i}.currentInputWatermark`); - } - return this.metricService.getMetrics(this.jobId, node.id, listOfMetricId).pipe( - map(metrics => { - let minValue = NaN; - const watermarks: { [index: string]: number } = {}; - for (const key in metrics.values) { - const value = metrics.values[key]; - const subtaskIndex = key.replace('.currentInputWatermark', ''); - watermarks[subtaskIndex] = value; - if (isNaN(minValue) || value < minValue) { - minValue = value; - } - } - if (!isNaN(minValue) && minValue > LONG_MIN_VALUE) { - lowWatermark = minValue; - } else { - lowWatermark = NaN; - } + return this.metricService.getWatermarks(this.jobId, node.id).pipe( + map(result => { + lowWatermark = result.lowWatermark Review comment: miss 'semicolon' here ```suggestion lowWatermark = result.lowWatermark; ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to 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 With regards, Apache Git Services