Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doujutun3207
flink
提交
9580b8fe
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,发现更多精彩内容 >>
提交
9580b8fe
编写于
2月 29, 2016
作者:
U
Ufuk Celebi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[FLINK-3535] [runtime-web] Decrease log verbosity of StackTraceSampleCoordinator
This closes #1732.
上级
734ba01d
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
23 addition
and
14 deletion
+23
-14
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/BackPressureStatsTracker.java
...he/flink/runtime/webmonitor/BackPressureStatsTracker.java
+7
-2
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/StackTraceSampleCoordinator.java
...flink/runtime/webmonitor/StackTraceSampleCoordinator.java
+6
-2
flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/StackTraceSampleCoordinatorTest.java
...k/runtime/webmonitor/StackTraceSampleCoordinatorTest.java
+5
-9
flink-runtime/src/main/scala/org/apache/flink/runtime/messages/StackTraceSampleMessages.scala
...che/flink/runtime/messages/StackTraceSampleMessages.scala
+5
-1
未找到文件。
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/BackPressureStatsTracker.java
浏览文件 @
9580b8fe
...
...
@@ -33,6 +33,7 @@ import scala.concurrent.ExecutionContext;
import
scala.concurrent.Future
;
import
scala.concurrent.duration.FiniteDuration
;
import
java.util.Arrays
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -170,6 +171,10 @@ public class BackPressureStatsTracker {
if
(
executionContext
!=
null
)
{
pendingStats
.
add
(
vertex
);
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"Triggering stack trace sample for tasks: "
+
Arrays
.
toString
(
vertex
.
getTaskVertices
()));
}
Future
<
StackTraceSample
>
sample
=
coordinator
.
triggerStackTraceSample
(
vertex
.
getTaskVertices
(),
numSamples
,
...
...
@@ -246,7 +251,7 @@ public class BackPressureStatsTracker {
OperatorBackPressureStats
stats
=
createStatsFromSample
(
success
);
operatorStatsCache
.
put
(
vertex
,
stats
);
}
else
{
LOG
.
warn
(
"Failed to gather stack trace sample."
,
failure
);
LOG
.
debug
(
"Failed to gather stack trace sample."
,
failure
);
}
}
catch
(
Throwable
t
)
{
LOG
.
error
(
"Error during stats completion."
,
t
);
...
...
@@ -278,7 +283,7 @@ public class BackPressureStatsTracker {
if
(
sampledTasks
.
contains
(
taskId
))
{
subtaskIndexMap
.
put
(
taskId
,
task
.
getParallelSubtaskIndex
());
}
else
{
throw
new
RuntimeException
(
"Outdated sample. A task, which is part of the "
+
LOG
.
debug
(
"Outdated sample. A task, which is part of the "
+
"sample has been reset."
);
}
}
...
...
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/StackTraceSampleCoordinator.java
浏览文件 @
9580b8fe
...
...
@@ -179,7 +179,9 @@ public class StackTraceSampleCoordinator {
pending
.
getSampleId
());
pending
.
discard
(
new
RuntimeException
(
"Time out"
));
pendingSamples
.
remove
(
pending
.
getSampleId
());
if
(
pendingSamples
.
remove
(
pending
.
getSampleId
())
!=
null
)
{
rememberRecentSampleId
(
pending
.
getSampleId
());
}
}
}
}
catch
(
Throwable
t
)
{
...
...
@@ -319,7 +321,9 @@ public class StackTraceSampleCoordinator {
sampleId
,
executionId
);
}
}
else
{
throw
new
IllegalStateException
(
"Unknown sample ID "
+
sampleId
);
if
(
LOG
.
isDebugEnabled
())
{
LOG
.
debug
(
"Unknown sample ID "
+
sampleId
);
}
}
}
}
...
...
flink-runtime-web/src/test/java/org/apache/flink/runtime/webmonitor/StackTraceSampleCoordinatorTest.java
浏览文件 @
9580b8fe
...
...
@@ -226,17 +226,13 @@ public class StackTraceSampleCoordinatorTest {
Throwable
cause
=
sampleFuture
.
failed
().
value
().
get
().
get
();
assertTrue
(
cause
.
getCause
().
getMessage
().
contains
(
"Time out"
));
// Collect after the timeout
try
{
// Collect after the timeout (should be ignored)
ExecutionAttemptID
executionId
=
vertices
[
0
].
getCurrentExecutionAttempt
().
getAttemptId
();
coord
.
collectStackTraces
(
0
,
executionId
,
new
ArrayList
<
StackTraceElement
[]>());
fail
(
"Did not throw expected Exception"
);
}
catch
(
IllegalStateException
ignored
)
{
}
}
/** Tests that collecting an unknown sample
fails
. */
@Test
(
expected
=
IllegalStateException
.
class
)
/** Tests that collecting an unknown sample
is ignored
. */
@Test
public
void
testCollectStackTraceForUnknownSample
()
throws
Exception
{
coord
.
collectStackTraces
(
0
,
new
ExecutionAttemptID
(),
new
ArrayList
<
StackTraceElement
[]>());
}
...
...
flink-runtime/src/main/scala/org/apache/flink/runtime/messages/StackTraceSampleMessages.scala
浏览文件 @
9580b8fe
...
...
@@ -63,7 +63,11 @@ object StackTraceSampleMessages {
sampleId
:
Int
,
executionId
:
ExecutionAttemptID
,
samples
:
java.util.List
[
Array
[
StackTraceElement
]])
extends
StackTraceSampleMessages
extends
StackTraceSampleMessages
{
override
def
toString
:
String
=
s
"ResponseStackTraceSampleSuccess($sampleId, $executionId, ${samples.size()} samples)"
}
/**
* Response after a failed stack trace sample (sent by the task managers to
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录