Github user uce commented on a diff in the pull request:
https://github.com/apache/flink/pull/3366#discussion_r102205464
--- 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
+ deferred.resolve(watermarks)
+ deferred.promise
+
+ getLowWatermarks = (watermarks)->
+ lowWatermarks = []
+ for k,v of watermarks
+ minValue = Math.min.apply(null,(watermark.value for watermark in v))
+ lowWatermarks[k] = if minValue <= -9223372036854776000 || v.length
== 0 then 'None' else minValue
--- End diff --
The constant `-9223372036854776000 ` is different than the returned Java
`Long.MIN_VALUE`, because of differences of the internal data representation
for numbers in Java and JavaScript. I think it would be good to have this
constant as an extra variable with a name and comment that describes what it is
(maybe `NO_WATERMARK` or so?).
---
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.
---