Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/1517#discussion_r64667955
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/io/disk/RandomAccessInputView.java
---
@@ -45,7 +45,12 @@ public RandomAccessInputView(ArrayList<MemorySegment>
segments, int segmentSize)
{
this(segments, segmentSize, segmentSize);
}
-
+
+ public RandomAccessInputView(ArrayList<MemorySegment> segments, int
segmentSize, boolean dummy)
--- End diff --
This constructor is called twice from the constructor of the
`ReduceHashTable`. Once to initialize the input view of the `RecordArea` and
once for the `StagingArea`. Both areas will need at least one buffer. Maybe I
am wrong, but if we give both one initial buffer, we do not need this
additional constructor with the `dummy` flag.
As a second alternative to the constructor with the `dummy` flag, we could
also implement a constructor without the `ArrayList<MemorySegment>`, create it
in the constructor, and add a `getSegementList()` method to access the created
list.
What do you think, @ggevay?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---