Java Code Examples for org.apache.flink.runtime.operators.testutils.types.IntPairComparator

The following examples show how to use org.apache.flink.runtime.operators.testutils.types.IntPairComparator. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: Flink-CEPplus   Source File: HashTableITCase.java    License: Apache License 2.0 6 votes vote down vote up
@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();
}
 
Example 2
Source Project: flink   Source File: HashTableITCase.java    License: Apache License 2.0 6 votes vote down vote up
@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();
}
 
Example 3
Source Project: flink   Source File: HashTableITCase.java    License: Apache License 2.0 6 votes vote down vote up
@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 = MemoryManagerBuilder.newBuilder().setMemorySize(32 * 1024 * 1024).build();
	this.ioManager = new IOManagerAsync();
}
 
Example 4
Source Project: Flink-CEPplus   Source File: FixedLengthRecordSorterTest.java    License: Apache License 2.0 5 votes vote down vote up
@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();
}
 
Example 5
Source Project: flink   Source File: FixedLengthRecordSorterTest.java    License: Apache License 2.0 5 votes vote down vote up
@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();
}
 
Example 6
Source Project: flink   Source File: FixedLengthRecordSorterTest.java    License: Apache License 2.0 5 votes vote down vote up
@Before
public void beforeTest() {
	this.memoryManager = MemoryManagerBuilder
		.newBuilder()
		.setMemorySize(MEMORY_SIZE)
		.setPageSize(MEMORY_PAGE_SIZE)
		.build();
	this.ioManager = new IOManagerAsync();
	this.serializer = new IntPairSerializer();
	this.comparator = new IntPairComparator();
}