use of org.apache.flink.api.common.functions.util.ListCollector in project flink by apache.
the class AbstractSortMergeOuterJoinIteratorITCase method computeOuterJoin.
@SuppressWarnings("unchecked, rawtypes")
private List<Tuple4<String, String, String, Object>> computeOuterJoin(ResettableMutableObjectIterator<Tuple2<String, String>> input1, ResettableMutableObjectIterator<Tuple2<String, Integer>> input2, OuterJoinType outerJoinType) throws Exception {
input1.reset();
input2.reset();
AbstractMergeOuterJoinIterator iterator = createOuterJoinIterator(outerJoinType, input1, input2, serializer1, comparator1, serializer2, comparator2, pairComp, this.memoryManager, this.ioManager, PAGES_FOR_BNLJN, this.parentTask);
List<Tuple4<String, String, String, Object>> actual = new ArrayList<>();
ListCollector<Tuple4<String, String, String, Object>> collector = new ListCollector<>(actual);
while (iterator.callWithNextKey(new SimpleTupleJoinFunction(), collector)) ;
iterator.close();
return actual;
}
Aggregations