zhijiangW commented on a change in pull request #9478: [FLINK-13766][task]
Refactor the implementation of StreamInputProcessor based on
StreamTaskInput#emitNext
URL: https://github.com/apache/flink/pull/9478#discussion_r318867046
##########
File path:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/StreamTwoInputSelectableProcessor.java
##########
@@ -381,12 +333,28 @@ private ForwardingValveOutputHandler(
this.streamStatusMaintainer =
checkNotNull(streamStatusMaintainer);
this.inputWatermarkGauge = inputWatermarkGauge;
+ this.numRecordsIn = checkNotNull(numRecordsIn);
this.inputIndex = inputIndex;
}
@Override
- public void handleWatermark(Watermark watermark) throws
Exception {
+ @SuppressWarnings("unchecked")
+ public void emitRecord(StreamRecord record) throws Exception {
+ synchronized (lock) {
+ numRecordsIn.inc();
+ if (inputIndex == 0) {
Review comment:
Yes, my only concern for this way is also for potential debugging issue.
----------------------------------------------------------------
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