Sxnan commented on code in PR #23521:
URL: https://github.com/apache/flink/pull/23521#discussion_r1366597779
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/AbstractStreamOperator.java:
##########
@@ -649,4 +659,52 @@ public OperatorID getOperatorID() {
protected Optional<InternalTimeServiceManager<?>> getTimeServiceManager() {
return Optional.ofNullable(timeServiceManager);
}
+
+ @Experimental
+ public void processRecordAttributes(RecordAttributes recordAttributes)
throws Exception {
+ lastRecordAttributes1 = recordAttributes;
+ if (timeServiceManager != null
+ && timeServiceManager instanceof
InternalBacklogAwareTimerServiceManagerImpl) {
+ final InternalBacklogAwareTimerServiceManagerImpl<?>
backlogAwareTimerServiceManager =
+ (InternalBacklogAwareTimerServiceManagerImpl<?>)
timeServiceManager;
+ if (recordAttributes instanceof InternalRecordAttributes) {
+ backlogAwareTimerServiceManager.setMaxWatermarkDuringBacklog(
+ ((InternalRecordAttributes) recordAttributes)
+ .getMaxWatermarkDuringBacklog());
+ }
+
backlogAwareTimerServiceManager.setBacklog(recordAttributes.isBacklog());
+ }
+ output.emitRecordAttributes(
+ new
RecordAttributesBuilder(Collections.singletonList(recordAttributes)).build());
+ }
+
+ @Experimental
+ public void processRecordAttributes1(RecordAttributes recordAttributes)
throws Exception {
+ lastRecordAttributes1 = recordAttributes;
+ List<RecordAttributes> lastRecordAttributes =
getTwoInputsLastRecordAttributes();
+ output.emitRecordAttributes(new
RecordAttributesBuilder(lastRecordAttributes).build());
Review Comment:
`BacklogAwareTimerSerivceManager` is only used by one input StreamOperator.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]