You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by zh...@apache.org on 2019/09/09 14:03:32 UTC
[flink] 01/02: [hotfix][runtime] SourceStreamTask: set legacy
source thread name to improve debugging
This is an automated email from the ASF dual-hosted git repository.
zhijiang pushed a commit to branch release-1.9
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 1638fb3812047736524cd8e25bc4d5a6fa2596a7
Author: Aleksey Pak <al...@ververica.com>
AuthorDate: Fri Sep 6 10:00:31 2019 +0200
[hotfix][runtime] SourceStreamTask: set legacy source thread name to improve debugging
---
.../org/apache/flink/streaming/runtime/tasks/SourceStreamTask.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SourceStreamTask.java b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SourceStreamTask.java
index e06e2b4..5caddef 100644
--- a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SourceStreamTask.java
+++ b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/SourceStreamTask.java
@@ -114,6 +114,7 @@ public class SourceStreamTask<OUT, SRC extends SourceFunction<OUT>, OP extends S
protected void performDefaultAction(ActionContext context) throws Exception {
// Against the usual contract of this method, this implementation is not step-wise but blocking instead for
// compatibility reasons with the current source interface (source functions run as a loop, not in steps).
+ sourceThread.setTaskDescription(getName());
sourceThread.start();
// We run an alternative mailbox loop that does not involve default actions and synchronizes around actions.
@@ -207,6 +208,10 @@ public class SourceStreamTask<OUT, SRC extends SourceFunction<OUT>, OP extends S
}
}
+ public void setTaskDescription(final String taskDescription) {
+ setName("Legacy Source Thread - " + taskDescription);
+ }
+
void checkThrowSourceExecutionException() throws Exception {
if (sourceExecutionThrowable != null) {
throw new Exception(sourceExecutionThrowable);