Github user uce commented on a diff in the pull request:
https://github.com/apache/flink/pull/3366#discussion_r102208620
--- Diff:
flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.ctrl.coffee ---
@@ -81,6 +78,51 @@ angular.module('flinkApp')
JobsService.stopJob($stateParams.jobid).then (data) ->
{}
+ loadJob = ()->
+ JobsService.loadJob($stateParams.jobid).then (data) ->
+ $scope.job = data
+ $scope.vertices = data.vertices
+ $scope.plan = data.plan
+ MetricsService.setupMetrics($stateParams.jobid, data.vertices)
+
+ getWatermarks = (nodes)->
+ deferred = $q.defer()
+ watermarks = {}
+ jid = $scope.job.jid
+ angular.forEach nodes, (node, index) =>
+ metricIds = []
+ for num in [0..node.parallelism - 1]
+ metricIds.push(num + ".currentLowWatermark")
+ MetricsService.getMetrics(jid, node.id, metricIds).then (data) ->
+ values = []
+ for key, value of data.values
+ values.push(id: key.replace('.currentLowWatermark', ''), value:
value)
+ watermarks[node.id] = values
+ if index >= $scope.plan.nodes.length - 1
--- End diff --
I'm wondering whether the idiomatic way to use promises to union them via
`$q.all(promises)` and then fill watermarks when all are finished?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---