rkhachatryan commented on a change in pull request #13234:
URL: https://github.com/apache/flink/pull/13234#discussion_r479150979
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OperatorChain.java
##########
@@ -208,19 +212,97 @@ public OperatorChain(
OperatorChain(
List<StreamOperatorWrapper<?, ?>> allOperatorWrappers,
RecordWriterOutput<?>[] streamOutputs,
- WatermarkGaugeExposingOutput<StreamRecord<OUT>>
chainEntryPoint,
- StreamOperatorWrapper<OUT, OP> headOperatorWrapper) {
+ WatermarkGaugeExposingOutput<StreamRecord<OUT>>
mainOperatorOutput,
+ StreamOperatorWrapper<OUT, OP> mainOperatorWrapper) {
this.streamOutputs = checkNotNull(streamOutputs);
- this.chainEntryPoint = checkNotNull(chainEntryPoint);
+ this.mainOperatorOutput = checkNotNull(mainOperatorOutput);
this.operatorEventDispatcher = null;
checkState(allOperatorWrappers != null &&
allOperatorWrappers.size() > 0);
- this.headOperatorWrapper = checkNotNull(headOperatorWrapper);
+ this.mainOperatorWrapper = checkNotNull(mainOperatorWrapper);
this.tailOperatorWrapper = allOperatorWrappers.get(0);
this.numOperators = allOperatorWrappers.size();
+ this.chainedSources = Collections.emptyMap();
+
+ firstOperatorWrapper =
linkOperatorWrappers(allOperatorWrappers);
+ }
+
+ private void createChainOutputs(
+ List<StreamEdge> outEdgesInOrder,
+
RecordWriterDelegate<SerializationDelegate<StreamRecord<OUT>>>
recordWriterDelegate,
+ Map<Integer, StreamConfig> chainedConfigs,
+ StreamTask<OUT, OP> containingTask,
+ Map<StreamEdge, RecordWriterOutput<?>> streamOutputMap)
{
+ for (int i = 0; i < outEdgesInOrder.size(); i++) {
+ StreamEdge outEdge = outEdgesInOrder.get(i);
+
+ RecordWriterOutput<?> streamOutput = createStreamOutput(
+ recordWriterDelegate.getRecordWriter(i),
+ outEdge,
+ chainedConfigs.get(outEdge.getSourceId()),
+ containingTask.getEnvironment());
+
+ this.streamOutputs[i] = streamOutput;
+ streamOutputMap.put(outEdge, streamOutput);
+ }
+ }
+
+ private Map<SourceInputConfig, ChainedSource> createChainedInputs(
Review comment:
This method as well as `createChainedInputs` is full of compiler
warnings too - can you fix them please?
----------------------------------------------------------------
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]