rkhachatryan commented on a change in pull request #12120:
URL: https://github.com/apache/flink/pull/12120#discussion_r424949957
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/api/serialization/SpillingAdaptiveSpanningRecordDeserializer.java
##########
@@ -158,7 +113,10 @@ public void clear() {
@Override
public boolean hasUnfinishedData() {
- return this.nonSpanningWrapper.remaining() > 0 ||
this.spanningWrapper.getNumGatheredBytes() > 0;
+ return this.nonSpanningWrapper.hasRemaining() ||
this.spanningWrapper.getNumGatheredBytes() > 0;
}
+ interface BufferWrapper {
+ Optional<MemorySegment> getUnconsumedSegment() throws
IOException;
+ }
Review comment:
It is implemented by both wrappers (used in
`SpillingAdaptiveSpanningRecordDeserializer`).
I think they could further be unified (unless we drop `NonSpanningWrapper`
and merge
`SpillingAdaptiveSpanningRecordDeserializer` with `SpanningWrapper`).
----------------------------------------------------------------
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]