StefanRRichter commented on a change in pull request #8361:
[FLINK-12434][network] Replace listeners with CompletableFuture in InputGates
URL: https://github.com/apache/flink/pull/8361#discussion_r282019009
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/UnionInputGate.java
##########
@@ -159,14 +159,28 @@ public void requestPartitions() throws IOException,
InterruptedException {
@Override
public Optional<BufferOrEvent> getNextBufferOrEvent() throws
IOException, InterruptedException {
+ return getNextBufferOrEvent(true);
+ }
+
+ @Override
+ public Optional<BufferOrEvent> pollNextBufferOrEvent() throws
IOException, InterruptedException {
Review comment:
Why does a polling method have to declare an `InterruptedException`? Sounds
not very logical to me and can confuse user of the interface. It seems like
this is leaking the implementation detail that we are internally using the same
method for blocking and non-blocking. Maybe that idea should be revisited even
if it brings along some code duplication?
----------------------------------------------------------------
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