Search in sources :

Example 1 with IntPairSerializer

use of org.apache.flink.runtime.operators.testutils.types.IntPairSerializer in project flink by apache.

the class ReusingHashJoinIteratorITCase method beforeTest.

@SuppressWarnings("unchecked")
@Before
public void beforeTest() {
    this.recordSerializer = TestData.getIntStringTupleSerializer();
    this.record1Comparator = TestData.getIntStringTupleComparator();
    this.record2Comparator = TestData.getIntStringTupleComparator();
    this.recordPairComparator = new GenericPairComparator(this.record1Comparator, this.record2Comparator);
    this.pairSerializer = new IntPairSerializer();
    this.pairComparator = new TestData.IntPairComparator();
    this.pairRecordPairComparator = new IntPairTuplePairComparator();
    this.recordPairPairComparator = new TupleIntPairPairComparator();
    this.memoryManager = new MemoryManager(MEMORY_SIZE, 1);
    this.ioManager = new IOManagerAsync();
}
Also used : TestData(org.apache.flink.runtime.operators.testutils.TestData) IOManagerAsync(org.apache.flink.runtime.io.disk.iomanager.IOManagerAsync) GenericPairComparator(org.apache.flink.api.common.typeutils.GenericPairComparator) IntPairSerializer(org.apache.flink.runtime.operators.testutils.types.IntPairSerializer) MemoryManager(org.apache.flink.runtime.memory.MemoryManager) Before(org.junit.Before)

Example 2 with IntPairSerializer

use of org.apache.flink.runtime.operators.testutils.types.IntPairSerializer in project flink by apache.

the class NonReusingHashJoinIteratorITCase method beforeTest.

@SuppressWarnings("unchecked")
@Before
public void beforeTest() {
    this.recordSerializer = TestData.getIntStringTupleSerializer();
    this.record1Comparator = TestData.getIntStringTupleComparator();
    this.record2Comparator = TestData.getIntStringTupleComparator();
    this.recordPairComparator = new GenericPairComparator(record1Comparator, record2Comparator);
    this.pairSerializer = new IntPairSerializer();
    this.pairComparator = new TestData.IntPairComparator();
    this.pairRecordPairComparator = new IntPairTuplePairComparator();
    this.recordPairPairComparator = new TupleIntPairPairComparator();
    this.memoryManager = new MemoryManager(MEMORY_SIZE, 1);
    this.ioManager = new IOManagerAsync();
}
Also used : TestData(org.apache.flink.runtime.operators.testutils.TestData) IOManagerAsync(org.apache.flink.runtime.io.disk.iomanager.IOManagerAsync) GenericPairComparator(org.apache.flink.api.common.typeutils.GenericPairComparator) IntPairSerializer(org.apache.flink.runtime.operators.testutils.types.IntPairSerializer) MemoryManager(org.apache.flink.runtime.memory.MemoryManager) Before(org.junit.Before)

Example 3 with IntPairSerializer

use of org.apache.flink.runtime.operators.testutils.types.IntPairSerializer in project flink by apache.

the class FixedLengthRecordSorterTest method beforeTest.

@Before
public void beforeTest() {
    this.memoryManager = new MemoryManager(MEMORY_SIZE, 1, MEMORY_PAGE_SIZE, MemoryType.HEAP, true);
    this.ioManager = new IOManagerAsync();
    this.serializer = new IntPairSerializer();
    this.comparator = new IntPairComparator();
}
Also used : IOManagerAsync(org.apache.flink.runtime.io.disk.iomanager.IOManagerAsync) IntPairComparator(org.apache.flink.runtime.operators.testutils.types.IntPairComparator) IntPairSerializer(org.apache.flink.runtime.operators.testutils.types.IntPairSerializer) MemoryManager(org.apache.flink.runtime.memory.MemoryManager) Before(org.junit.Before)

Example 4 with IntPairSerializer

use of org.apache.flink.runtime.operators.testutils.types.IntPairSerializer in project flink by apache.

the class HashTableITCase method setup.

@Before
public void setup() {
    final int[] keyPos = new int[] { 0 };
    @SuppressWarnings("unchecked") final Class<? extends Value>[] keyType = (Class<? extends Value>[]) new Class[] { IntValue.class };
    this.recordBuildSideAccesssor = RecordSerializer.get();
    this.recordProbeSideAccesssor = RecordSerializer.get();
    this.recordBuildSideComparator = new RecordComparator(keyPos, keyType);
    this.recordProbeSideComparator = new RecordComparator(keyPos, keyType);
    this.pactRecordComparator = new RecordPairComparatorFirstInt();
    this.pairBuildSideAccesssor = new IntPairSerializer();
    this.pairProbeSideAccesssor = new IntPairSerializer();
    this.pairBuildSideComparator = new IntPairComparator();
    this.pairProbeSideComparator = new IntPairComparator();
    this.pairComparator = new IntPairPairComparator();
    this.memManager = new MemoryManager(32 * 1024 * 1024, 1);
    this.ioManager = new IOManagerAsync();
}
Also used : IntPairPairComparator(org.apache.flink.runtime.operators.testutils.types.IntPairPairComparator) IntPairComparator(org.apache.flink.runtime.operators.testutils.types.IntPairComparator) IOManagerAsync(org.apache.flink.runtime.io.disk.iomanager.IOManagerAsync) IntValue(org.apache.flink.types.IntValue) Value(org.apache.flink.types.Value) IntPairSerializer(org.apache.flink.runtime.operators.testutils.types.IntPairSerializer) MemoryManager(org.apache.flink.runtime.memory.MemoryManager) RecordComparator(org.apache.flink.runtime.testutils.recordutils.RecordComparator) Before(org.junit.Before)

Aggregations

IOManagerAsync (org.apache.flink.runtime.io.disk.iomanager.IOManagerAsync)4 MemoryManager (org.apache.flink.runtime.memory.MemoryManager)4 IntPairSerializer (org.apache.flink.runtime.operators.testutils.types.IntPairSerializer)4 Before (org.junit.Before)4 GenericPairComparator (org.apache.flink.api.common.typeutils.GenericPairComparator)2 TestData (org.apache.flink.runtime.operators.testutils.TestData)2 IntPairComparator (org.apache.flink.runtime.operators.testutils.types.IntPairComparator)2 IntPairPairComparator (org.apache.flink.runtime.operators.testutils.types.IntPairPairComparator)1 RecordComparator (org.apache.flink.runtime.testutils.recordutils.RecordComparator)1 IntValue (org.apache.flink.types.IntValue)1 Value (org.apache.flink.types.Value)1