Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
ba13caa1
F
flink
项目概览
doujutun3207
/
flink
与 Fork 源项目一致
从无法访问的项目Fork
通知
24
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
flink
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ba13caa1
编写于
2月 01, 2016
作者:
U
Ufuk Celebi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FLINK-3310] [runtime-web] Add back pressure statistics to web dashboard (frontend)
This closes #1578.
上级
b7e70da3
变更
18
展开全部
隐藏空白更改
内联
并排
Showing
18 changed file
with
14323 addition
and
17850 deletion
+14323
-17850
flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.jade
...runtime-web/web-dashboard/app/partials/jobs/job.plan.jade
+3
-0
flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.backpressure.jade
...rd/app/partials/jobs/job.plan.node-list.backpressure.jade
+77
-0
flink-runtime-web/web-dashboard/app/scripts/common/directives.coffee
...me-web/web-dashboard/app/scripts/common/directives.coffee
+15
-0
flink-runtime-web/web-dashboard/app/scripts/common/filters.coffee
...ntime-web/web-dashboard/app/scripts/common/filters.coffee
+2
-0
flink-runtime-web/web-dashboard/app/scripts/index.coffee
flink-runtime-web/web-dashboard/app/scripts/index.coffee
+7
-0
flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.ctrl.coffee
...b/web-dashboard/app/scripts/modules/jobs/jobs.ctrl.coffee
+20
-0
flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
...eb/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
+18
-0
flink-runtime-web/web-dashboard/web/css/vendor.css
flink-runtime-web/web-dashboard/web/css/vendor.css
+6779
-7064
flink-runtime-web/web-dashboard/web/fonts/FontAwesome.otf
flink-runtime-web/web-dashboard/web/fonts/FontAwesome.otf
+0
-0
flink-runtime-web/web-dashboard/web/fonts/fontawesome-webfont.eot
...ntime-web/web-dashboard/web/fonts/fontawesome-webfont.eot
+0
-0
flink-runtime-web/web-dashboard/web/fonts/fontawesome-webfont.svg
...ntime-web/web-dashboard/web/fonts/fontawesome-webfont.svg
+22
-112
flink-runtime-web/web-dashboard/web/fonts/fontawesome-webfont.ttf
...ntime-web/web-dashboard/web/fonts/fontawesome-webfont.ttf
+0
-0
flink-runtime-web/web-dashboard/web/fonts/fontawesome-webfont.woff
...time-web/web-dashboard/web/fonts/fontawesome-webfont.woff
+0
-0
flink-runtime-web/web-dashboard/web/fonts/fontawesome-webfont.woff2
...ime-web/web-dashboard/web/fonts/fontawesome-webfont.woff2
+0
-0
flink-runtime-web/web-dashboard/web/js/index.js
flink-runtime-web/web-dashboard/web/js/index.js
+71
-1
flink-runtime-web/web-dashboard/web/js/vendor.js
flink-runtime-web/web-dashboard/web/js/vendor.js
+7228
-10673
flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.html
...runtime-web/web-dashboard/web/partials/jobs/job.plan.html
+1
-0
flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.backpressure.html
...rd/web/partials/jobs/job.plan.node-list.backpressure.html
+80
-0
未找到文件。
flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.jade
浏览文件 @
ba13caa1
...
...
@@ -30,4 +30,7 @@
li(ui-sref-active='active')
a(ui-sref=".checkpoints({nodeid: nodeid})") Checkpoints
li(ng-if="job.state == 'RUNNING'" ui-sref-active='active')
a(ui-sref=".backpressure({nodeid: nodeid})") Back Pressure
.panel-body.clean(ui-view="node-details")
flink-runtime-web/web-dashboard/app/partials/jobs/job.plan.node-list.backpressure.jade
0 → 100644
浏览文件 @
ba13caa1
//
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
table.table.table-body-hover.table-clickable.table-activable
thead
tr
th Name
th Status
tbody(ng-repeat="v in job.vertices" ng-class="{ active: v.id == nodeid }" ng-click="v.id == nodeid || changeNode(v.id)")
tr(ng-if="v.type == 'regular'")
td {{ v.name | humanizeText }}
td
bs-label(status="{{v.status}}") {{v.status}}
tr(ng-if="nodeid && v.id == nodeid")
td(ng-if="v.status != 'RUNNING'" colspan=2)
p Operator is not running. Cannot sample back pressure.
td(ng-if="v.status == 'RUNNING'" colspan=2)
table.table.table-hover.table-clickable.table-activable.table-inner
thead
tr
th Measurement
th Back Pressure Status
tbody
tr
td
span(ng-if="backPressureOperatorStats[v.id]['end-timestamp']") {{ now - backPressureOperatorStats[v.id]['end-timestamp'] | humanizeDuration }} ago
span(ng-if="backPressureOperatorStats[v.id]['status'] == 'deprecated'")
bp-label(status="in-progress") Sampling in progress...
td
bp-label(ng-if="backPressureOperatorStats[v.id]['backpressure-level']" status="{{backPressureOperatorStats[v.id]['backpressure-level']}}") {{ backPressureOperatorStats[v.id]['backpressure-level'] | toUpperCase }}
div(ng-if="!nodeUnfolded && backPressureOperatorStats[v.id]['subtasks'] && backPressureOperatorStats[v.id]['subtasks'].length > 0")
a.btn.btn-default(ng-click="toggleFold()")
| Show subtasks
= ' '
i.fa.fa-chevron-down
a.btn.btn-default.pull-right(ng-click="deactivateNode(); $event.stopPropagation()" title="Fold")
i.fa.fa-chevron-up
div(ng-if="nodeUnfolded && backPressureOperatorStats[v.id]['subtasks'] && backPressureOperatorStats[v.id]['subtasks'].length > 0")
a.btn.btn-default(ng-click="toggleFold()")
| Hide subtasks
= ' '
i.fa.fa-chevron-up
a.btn.btn-default.pull-right(ng-click="deactivateNode(); $event.stopPropagation()" title="Fold")
i.fa.fa-chevron-up
table.table.table-hover.table-clickable.table-activable.table-inner
thead
tr
th Subtask
th Ratio
th Status
tbody
tr(ng-repeat="subtask in backPressureOperatorStats[nodeid]['subtasks']")
td {{ subtask['subtask'] + 1 }}
td {{ subtask['ratio'] }}
td
bp-label(status="{{subtask['backpressure-level']}}") {{ subtask['backpressure-level'] | toUpperCase }}
flink-runtime-web/web-dashboard/app/scripts/common/directives.coffee
浏览文件 @
ba13caa1
...
...
@@ -35,6 +35,21 @@ angular.module('flinkApp')
# ----------------------------------------------
.
directive
'bpLabel'
,
(
JobsService
)
->
transclude
:
true
replace
:
true
scope
:
getBackPressureLabelClass
:
"&"
status
:
"@"
template
:
"<span title='{{status}}' ng-class='getBackPressureLabelClass()'><ng-transclude></ng-transclude></span>"
link
:
(
scope
,
element
,
attrs
)
->
scope
.
getBackPressureLabelClass
=
->
'label label-'
+
JobsService
.
translateBackPressureLabelState
(
attrs
.
status
)
# ----------------------------------------------
.
directive
'indicatorPrimary'
,
(
JobsService
)
->
replace
:
true
scope
:
...
...
flink-runtime-web/web-dashboard/app/scripts/common/filters.coffee
浏览文件 @
ba13caa1
...
...
@@ -73,3 +73,5 @@ angular.module('flinkApp')
return
""
if
typeof
bytes
is
"undefined"
or
bytes
is
null
if
bytes
<
1000
then
bytes
+
" B"
else
converter
(
bytes
,
1
)
.
filter
"toUpperCase"
,
->
(
text
)
->
text
.
toUpperCase
()
flink-runtime-web/web-dashboard/app/scripts/index.coffee
浏览文件 @
ba13caa1
...
...
@@ -113,6 +113,13 @@ angular.module('flinkApp', ['ui.router', 'angularMoment'])
templateUrl
:
"partials/jobs/job.plan.node-list.checkpoints.html"
controller
:
'JobPlanCheckpointsController'
.
state
"single-job.plan.backpressure"
,
url
:
"/backpressure"
views
:
'node-details'
:
templateUrl
:
"partials/jobs/job.plan.node-list.backpressure.html"
controller
:
'JobPlanBackPressureController'
.
state
"single-job.timeline"
,
url
:
"/timeline"
views
:
...
...
flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.ctrl.coffee
浏览文件 @
ba13caa1
...
...
@@ -51,6 +51,7 @@ angular.module('flinkApp')
$scope
.
vertices
=
null
$scope
.
jobCheckpointStats
=
null
$scope
.
showHistory
=
false
$scope
.
backPressureOperatorStats
=
{}
JobsService
.
loadJob
(
$stateParams
.
jobid
).
then
(
data
)
->
$scope
.
job
=
data
...
...
@@ -70,6 +71,7 @@ angular.module('flinkApp')
$scope
.
plan
=
null
$scope
.
vertices
=
null
$scope
.
jobCheckpointStats
=
null
$scope
.
backPressureOperatorStats
=
null
$interval
.
cancel
(
refresher
)
...
...
@@ -179,6 +181,24 @@ angular.module('flinkApp')
# --------------------------------------
.
controller
'JobPlanBackPressureController'
,
(
$scope
,
JobsService
)
->
console
.
log
'JobPlanBackPressureController'
$scope
.
now
=
Date
.
now
()
if
$scope
.
nodeid
JobsService
.
getOperatorBackPressure
(
$scope
.
nodeid
).
then
(
data
)
->
$scope
.
backPressureOperatorStats
[
$scope
.
nodeid
]
=
data
$scope
.
$on
'reload'
,
(
event
)
->
console
.
log
'JobPlanBackPressureController (relaod)'
$scope
.
now
=
Date
.
now
()
if
$scope
.
nodeid
JobsService
.
getOperatorBackPressure
(
$scope
.
nodeid
).
then
(
data
)
->
$scope
.
backPressureOperatorStats
[
$scope
.
nodeid
]
=
data
# --------------------------------------
.
controller
'JobTimelineVertexController'
,
(
$scope
,
$state
,
$stateParams
,
JobsService
)
->
console
.
log
'JobTimelineVertexController'
...
...
flink-runtime-web/web-dashboard/app/scripts/modules/jobs/jobs.svc.coffee
浏览文件 @
ba13caa1
...
...
@@ -232,6 +232,24 @@ angular.module('flinkApp')
deferred
.
promise
# Operator-level back pressure stats
@
getOperatorBackPressure
=
(
vertexid
)
->
deferred
=
$q
.
defer
()
$http
.
get
flinkConfig
.
jobServer
+
"jobs/"
+
currentJob
.
jid
+
"/vertices/"
+
vertexid
+
"/backpressure"
.
success
(
data
)
=>
deferred
.
resolve
(
data
)
deferred
.
promise
@
translateBackPressureLabelState
=
(
state
)
->
switch
state
.
toLowerCase
()
when
'in-progress'
then
'danger'
when
'ok'
then
'success'
when
'low'
then
'warning'
when
'high'
then
'danger'
else
'default'
@
loadExceptions
=
->
deferred
=
$q
.
defer
()
...
...
flink-runtime-web/web-dashboard/web/css/vendor.css
浏览文件 @
ba13caa1
此差异已折叠。
点击以展开。
flink-runtime-web/web-dashboard/web/fonts/FontAwesome.otf
浏览文件 @
ba13caa1
无法预览此类型文件
flink-runtime-web/web-dashboard/web/fonts/fontawesome-webfont.eot
浏览文件 @
ba13caa1
无法预览此类型文件
flink-runtime-web/web-dashboard/web/fonts/fontawesome-webfont.svg
浏览文件 @
ba13caa1
此差异已折叠。
点击以展开。
flink-runtime-web/web-dashboard/web/fonts/fontawesome-webfont.ttf
浏览文件 @
ba13caa1
无法预览此类型文件
flink-runtime-web/web-dashboard/web/fonts/fontawesome-webfont.woff
浏览文件 @
ba13caa1
无法预览此类型文件
flink-runtime-web/web-dashboard/web/fonts/fontawesome-webfont.woff2
浏览文件 @
ba13caa1
无法预览此类型文件
flink-runtime-web/web-dashboard/web/js/index.js
浏览文件 @
ba13caa1
此差异已折叠。
点击以展开。
flink-runtime-web/web-dashboard/web/js/vendor.js
浏览文件 @
ba13caa1
此差异已折叠。
点击以展开。
flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.html
浏览文件 @
ba13caa1
...
...
@@ -26,6 +26,7 @@ limitations under the License.
<li
ui-sref-active=
"active"
><a
ui-sref=
".overview({nodeid: nodeid})"
>
Overview
</a></li>
<li
ui-sref-active=
"active"
><a
ui-sref=
".accumulators({nodeid: nodeid})"
>
Accumulators
</a></li>
<li
ui-sref-active=
"active"
><a
ui-sref=
".checkpoints({nodeid: nodeid})"
>
Checkpoints
</a></li>
<li
ng-if=
"job.state == 'RUNNING'"
ui-sref-active=
"active"
><a
ui-sref=
".backpressure({nodeid: nodeid})"
>
Back Pressure
</a></li>
</ul>
</nav>
<div
ui-view=
"node-details"
class=
"panel-body clean"
></div>
...
...
flink-runtime-web/web-dashboard/web/partials/jobs/job.plan.node-list.backpressure.html
0 → 100644
浏览文件 @
ba13caa1
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<table
class=
"table table-body-hover table-clickable table-activable"
>
<thead>
<tr>
<th>
Name
</th>
<th>
Status
</th>
</tr>
</thead>
<tbody
ng-repeat=
"v in job.vertices"
ng-class=
"{ active: v.id == nodeid }"
ng-click=
"v.id == nodeid || changeNode(v.id)"
>
<tr
ng-if=
"v.type == 'regular'"
>
<td>
{{ v.name | humanizeText }}
</td>
<td>
<bs-label
status=
"{{v.status}}"
>
{{v.status}}
</bs-label>
</td>
</tr>
<tr
ng-if=
"nodeid && v.id == nodeid"
>
<td
ng-if=
"v.status != 'RUNNING'"
colspan=
"2"
>
<p>
Operator is not running. Cannot sample back pressure.
</p>
</td>
<td
ng-if=
"v.status == 'RUNNING'"
colspan=
"2"
>
<table
class=
"table table-hover table-clickable table-activable table-inner"
>
<thead>
<tr>
<th>
Measurement
</th>
<th>
Back Pressure Status
</th>
</tr>
</thead>
<tbody>
<tr>
<td><span
ng-if=
"backPressureOperatorStats[v.id]['end-timestamp']"
>
{{ now - backPressureOperatorStats[v.id]['end-timestamp'] | humanizeDuration }} ago
</span><span
ng-if=
"backPressureOperatorStats[v.id]['status'] == 'deprecated'"
>
<bp-label
status=
"in-progress"
>
Sampling in progress...
</bp-label></span></td>
<td>
<bp-label
ng-if=
"backPressureOperatorStats[v.id]['backpressure-level']"
status=
"{{backPressureOperatorStats[v.id]['backpressure-level']}}"
>
{{ backPressureOperatorStats[v.id]['backpressure-level'] | toUpperCase }}
</bp-label>
</td>
</tr>
</tbody>
</table>
<div
ng-if=
"!nodeUnfolded && backPressureOperatorStats[v.id]['subtasks'] && backPressureOperatorStats[v.id]['subtasks'].length > 0"
><a
ng-click=
"toggleFold()"
class=
"btn btn-default"
>
Show subtasks
<i
class=
"fa fa-chevron-down"
></i></a><a
ng-click=
"deactivateNode(); $event.stopPropagation()"
title=
"Fold"
class=
"btn btn-default pull-right"
><i
class=
"fa fa-chevron-up"
></i></a></div>
<div
ng-if=
"nodeUnfolded && backPressureOperatorStats[v.id]['subtasks'] && backPressureOperatorStats[v.id]['subtasks'].length > 0"
><a
ng-click=
"toggleFold()"
class=
"btn btn-default"
>
Hide subtasks
<i
class=
"fa fa-chevron-up"
></i></a><a
ng-click=
"deactivateNode(); $event.stopPropagation()"
title=
"Fold"
class=
"btn btn-default pull-right"
><i
class=
"fa fa-chevron-up"
></i></a>
<table
class=
"table table-hover table-clickable table-activable table-inner"
>
<thead>
<tr>
<th>
Subtask
</th>
<th>
Ratio
</th>
<th>
Status
</th>
</tr>
</thead>
<tbody>
<tr
ng-repeat=
"subtask in backPressureOperatorStats[nodeid]['subtasks']"
>
<td>
{{ subtask['subtask'] + 1 }}
</td>
<td>
{{ subtask['ratio'] }}
</td>
<td>
<bp-label
status=
"{{subtask['backpressure-level']}}"
>
{{ subtask['backpressure-level'] | toUpperCase }}
</bp-label>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录