Java Code Examples for org.apache.flink.runtime.io.disk.iomanager.BulkBlockChannelReader#close()

The following examples show how to use org.apache.flink.runtime.io.disk.iomanager.BulkBlockChannelReader#close() . 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 File: ReOpenableHashPartition.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
/**
 * This method is called every time a multi-match hash map is opened again for a new probe input.
 * @param ioManager 
 * @param availableMemory 
 * @throws IOException 
 */
void restorePartitionBuffers(IOManager ioManager, List<MemorySegment> availableMemory) throws IOException {
	final BulkBlockChannelReader reader = ioManager.createBulkBlockChannelReader(this.initialBuildSideChannel, 
		availableMemory, this.initialPartitionBuffersCount);
	reader.close();
	final List<MemorySegment> partitionBuffersFromDisk = reader.getFullSegments();
	this.partitionBuffers = (MemorySegment[]) partitionBuffersFromDisk.toArray(new MemorySegment[partitionBuffersFromDisk.size()]);
	
	this.overflowSegments = new MemorySegment[2];
	this.numOverflowSegments = 0;
	this.nextOverflowBucket = 0;
	this.isRestored = true;
}
 
Example 2
Source File: ReOpenableHashPartition.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * This method is called every time a multi-match hash map is opened again for a new probe input.
 * @param ioManager 
 * @param availableMemory 
 * @throws IOException 
 */
void restorePartitionBuffers(IOManager ioManager, List<MemorySegment> availableMemory) throws IOException {
	final BulkBlockChannelReader reader = ioManager.createBulkBlockChannelReader(this.initialBuildSideChannel, 
		availableMemory, this.initialPartitionBuffersCount);
	reader.close();
	final List<MemorySegment> partitionBuffersFromDisk = reader.getFullSegments();
	this.partitionBuffers = (MemorySegment[]) partitionBuffersFromDisk.toArray(new MemorySegment[partitionBuffersFromDisk.size()]);
	
	this.overflowSegments = new MemorySegment[2];
	this.numOverflowSegments = 0;
	this.nextOverflowBucket = 0;
	this.isRestored = true;
}
 
Example 3
Source File: ReOpenableHashPartition.java    From flink with Apache License 2.0 5 votes vote down vote up
/**
 * This method is called every time a multi-match hash map is opened again for a new probe input.
 * @param ioManager 
 * @param availableMemory 
 * @throws IOException 
 */
void restorePartitionBuffers(IOManager ioManager, List<MemorySegment> availableMemory) throws IOException {
	final BulkBlockChannelReader reader = ioManager.createBulkBlockChannelReader(this.initialBuildSideChannel, 
		availableMemory, this.initialPartitionBuffersCount);
	reader.close();
	final List<MemorySegment> partitionBuffersFromDisk = reader.getFullSegments();
	this.partitionBuffers = (MemorySegment[]) partitionBuffersFromDisk.toArray(new MemorySegment[partitionBuffersFromDisk.size()]);
	
	this.overflowSegments = new MemorySegment[2];
	this.numOverflowSegments = 0;
	this.nextOverflowBucket = 0;
	this.isRestored = true;
}