pnowojski commented on a change in pull request #9879: [FLINK-14300][runtime,
test] Add test making sure that RecordWriter is properly closed in case of
early StreamTask failure
URL: https://github.com/apache/flink/pull/9879#discussion_r333902840
##########
File path:
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamConfigChainer.java
##########
@@ -42,22 +44,29 @@
public class StreamConfigChainer {
private final StreamConfig headConfig;
private final Map<Integer, StreamConfig> chainedConfigs = new
HashMap<>();
+ private final long bufferTimeout;
private StreamConfig tailConfig;
private int chainIndex = 0;
public StreamConfigChainer(OperatorID headOperatorID, StreamOperator<?>
headOperator, StreamConfig headConfig) {
+ this(headOperatorID, SimpleOperatorFactory.of(headOperator),
headConfig);
+ }
+
+ public StreamConfigChainer(OperatorID headOperatorID,
StreamOperatorFactory<?> headOperatorFactory, StreamConfig headConfig) {
this.headConfig = checkNotNull(headConfig);
this.tailConfig = checkNotNull(headConfig);
+ this.bufferTimeout = headConfig.getBufferTimeout();
- head(headOperator, headOperatorID);
+ head(headOperatorID, headOperatorFactory);
}
- private void head(StreamOperator<?> headOperator, OperatorID
headOperatorID) {
- headConfig.setStreamOperator(headOperator);
+ private void head(OperatorID headOperatorID, StreamOperatorFactory<?>
headOperatorFactory) {
+ headConfig.setStreamOperatorFactory(headOperatorFactory);
headConfig.setOperatorID(headOperatorID);
headConfig.setChainStart();
headConfig.setChainIndex(chainIndex);
+ headConfig.setBufferTimeout(bufferTimeout);
Review comment:
I wanted to keep it consistent.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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