Github user tillrohrmann commented on a diff in the pull request:
https://github.com/apache/flink/pull/6096#discussion_r192976292
--- Diff:
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/ProcessOperator.java
---
@@ -114,12 +114,22 @@ public long currentWatermark() {
@Override
public void registerProcessingTimeTimer(long time) {
- throw new UnsupportedOperationException("Setting timers
is only supported on a KeyedStream.");
+ throw new
UnsupportedOperationException(UNSUPPORTED_REGISTER_TIMER_MSG);
}
@Override
public void registerEventTimeTimer(long time) {
- throw new UnsupportedOperationException("Setting timers
is only supported on a KeyedStream.");
+ throw new
UnsupportedOperationException(UNSUPPORTED_REGISTER_TIMER_MSG);
+ }
+
+ @Override
+ public void deleteProcessingTimeTimer(long time) {
+ throw new
UnsupportedOperationException(UNSUPPORTED_DELETE_TIMER_MSG);
+ }
+
+ @Override
+ public void deleteEventTimeTimer(long time) {
+ throw new
UnsupportedOperationException(UNSUPPORTED_DELETE_TIMER_MSG);
}
--- End diff --
I know it is out of scope, but why do we give access to the `TimerService`
in a non-keyed context? Wouldn't it be better to follow the
interface-segregation principle a bit more here and expose the timer service
only to keyed operators? Is there a reason why we don't do it like that
@aljoscha?
---