lamber-ken closed pull request #7396: [FLINK-11250][streaming] fix thread lack
when StreamTask switched from DEPLOYING to CANCELING
URL: https://github.com/apache/flink/pull/7396
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git
a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
index 9ee8892cf95..ab6ad19137c 100644
---
a/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
+++
b/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/StreamTask.java
@@ -177,7 +177,7 @@
/** Wrapper for synchronousCheckpointExceptionHandler to deal with
rethrown exceptions. Used in the async part. */
private AsyncCheckpointExceptionHandler
asynchronousCheckpointExceptionHandler;
- private final
List<StreamRecordWriter<SerializationDelegate<StreamRecord<OUT>>>>
streamRecordWriters;
+ private
List<StreamRecordWriter<SerializationDelegate<StreamRecord<OUT>>>>
streamRecordWriters;
//
------------------------------------------------------------------------
@@ -209,7 +209,6 @@ protected StreamTask(
this.timerService = timeProvider;
this.configuration = new StreamConfig(getTaskConfiguration());
this.accumulatorMap =
getEnvironment().getAccumulatorRegistry().getUserMap();
- this.streamRecordWriters =
createStreamRecordWriters(configuration, environment);
}
//
------------------------------------------------------------------------
@@ -264,6 +263,7 @@ public final void invoke() throws Exception {
timerService = new
SystemProcessingTimeService(this, getCheckpointLock(), timerThreadFactory);
}
+ streamRecordWriters =
createStreamRecordWriters(configuration, getEnvironment());
operatorChain = new OperatorChain<>(this,
streamRecordWriters);
headOperator = operatorChain.getHeadOperator();
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services