Search in sources :

Example 6 with ListCollector

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;
}
Also used : Tuple4(org.apache.flink.api.java.tuple.Tuple4) SimpleTupleJoinFunction(org.apache.flink.runtime.operators.testutils.SimpleTupleJoinFunction) ListCollector(org.apache.flink.api.common.functions.util.ListCollector) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)6 ListCollector (org.apache.flink.api.common.functions.util.ListCollector)6 JoinAgentStatBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinAgentStatBo)5 JoinApplicationStatBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinApplicationStatBo)5 JoinStatBo (com.navercorp.pinpoint.common.server.bo.stat.join.JoinStatBo)5 JoinAgentStatBoMapper (com.navercorp.pinpoint.flink.mapper.thrift.stat.JoinAgentStatBoMapper)5 RawData (com.navercorp.pinpoint.flink.vo.RawData)5 TFAgentStatBatch (com.navercorp.pinpoint.thrift.dto.flink.TFAgentStatBatch)5 Tuple3 (org.apache.flink.api.java.tuple.Tuple3)5 Test (org.junit.Test)5 Tuple4 (org.apache.flink.api.java.tuple.Tuple4)1 SimpleTupleJoinFunction (org.apache.flink.runtime.operators.testutils.SimpleTupleJoinFunction)1