use of org.apache.flink.runtime.memory.MemoryManager in project flink by apache.
the class ReOpenableHashTableTestBase method beforeTest.
@SuppressWarnings({ "unchecked", "rawtypes" })
@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.recordBuildSideAccesssor = TestData.getIntIntTupleSerializer();
this.recordProbeSideAccesssor = TestData.getIntIntTupleSerializer();
this.recordBuildSideComparator = TestData.getIntIntTupleComparator();
this.recordProbeSideComparator = TestData.getIntIntTupleComparator();
this.pactRecordComparator = new GenericPairComparator(this.recordBuildSideComparator, this.recordProbeSideComparator);
this.memoryManager = new MemoryManager(MEMORY_SIZE, 1, PAGE_SIZE, MemoryType.HEAP, true);
this.ioManager = new IOManagerAsync();
}
use of org.apache.flink.runtime.memory.MemoryManager in project flink by apache.
the class UnaryOperatorTestBase method shutdownAll.
// --------------------------------------------------------------------------------------------
@After
public void shutdownAll() throws Exception {
// 1st, shutdown sorters
if (this.sorter != null) {
sorter.close();
}
// 2nd, shutdown I/O
this.ioManager.shutdown();
Assert.assertTrue("I/O Manager has not properly shut down.", this.ioManager.isProperlyShutDown());
// last, verify all memory is returned and shutdown mem manager
MemoryManager memMan = getMemoryManager();
if (memMan != null) {
Assert.assertTrue("Memory Manager managed memory was not completely freed.", memMan.verifyEmpty());
memMan.shutdown();
}
}
use of org.apache.flink.runtime.memory.MemoryManager in project flink by apache.
the class ReusingBlockResettableIteratorTest method startup.
@Before
public void startup() {
// set up IO and memory manager
this.memman = new MemoryManager(MEMORY_CAPACITY, 1);
// create test objects
this.objects = new ArrayList<Record>(20000);
for (int i = 0; i < NUM_VALUES; ++i) {
this.objects.add(new Record(new IntValue(i)));
}
// create the reader
this.reader = objects.iterator();
}
Aggregations