当前位置: 首页>>代码示例>>Java>>正文


Java SpillingBuffer类代码示例

本文整理汇总了Java中org.apache.flink.runtime.io.disk.SpillingBuffer的典型用法代码示例。如果您正苦于以下问题:Java SpillingBuffer类的具体用法?Java SpillingBuffer怎么用?Java SpillingBuffer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SpillingBuffer类属于org.apache.flink.runtime.io.disk包,在下文中一共展示了SpillingBuffer类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: SpillingResettableMutableObjectIterator

import org.apache.flink.runtime.io.disk.SpillingBuffer; //导入依赖的package包/类
private SpillingResettableMutableObjectIterator(MutableObjectIterator<T> input, TypeSerializer<T> serializer,
		MemoryManager memoryManager, IOManager ioManager,
		List<MemorySegment> memory, boolean releaseMemOnClose)
{
	this.memoryManager = memoryManager;
	this.input = input;
	this.serializer = serializer;
	this.memorySegments = memory;
	this.releaseMemoryOnClose = releaseMemOnClose;
	
	if (LOG.isDebugEnabled()) {
		LOG.debug("Creating spilling resettable iterator with " + memory.size() + " pages of memory.");
	}
	
	this.buffer = new SpillingBuffer(ioManager, new ListMemorySegmentSource(memory), memoryManager.getPageSize());
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:17,代码来源:SpillingResettableMutableObjectIterator.java

示例2: SpillingResettableIterator

import org.apache.flink.runtime.io.disk.SpillingBuffer; //导入依赖的package包/类
private SpillingResettableIterator(Iterator<T> input, TypeSerializer<T> serializer,
		MemoryManager memoryManager, IOManager ioManager,
		List<MemorySegment> memory, boolean releaseMemOnClose)
{
	this.memoryManager = memoryManager;
	this.input = input;
	this.instance = serializer.createInstance();
	this.serializer = serializer;
	this.memorySegments = memory;
	this.releaseMemoryOnClose = releaseMemOnClose;
	
	if (LOG.isDebugEnabled()) {
		LOG.debug("Creating spilling resettable iterator with " + memory.size() + " pages of memory.");
	}
	
	this.buffer = new SpillingBuffer(ioManager, new ListMemorySegmentSource(memory), memoryManager.getPageSize());
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:18,代码来源:SpillingResettableIterator.java

示例3: run

import org.apache.flink.runtime.io.disk.SpillingBuffer; //导入依赖的package包/类
@Override
public void run() {
	final MutableObjectIterator<T> input = this.input;
	final TypeSerializer<T> serializer = this.serializer;
	final SpillingBuffer buffer = this.buffer;
	
	try {
		T record = serializer.createInstance();
		
		while (this.running && ((record = input.next(record)) != null)) {
			serializer.serialize(record, buffer);
		}
		
		TempBarrier.this.writingDone();
	}
	catch (Throwable t) {
		TempBarrier.this.setException(t);
	}
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:20,代码来源:TempBarrier.java

示例4: run

import org.apache.flink.runtime.io.disk.SpillingBuffer; //导入依赖的package包/类
public void run() {
	final MutableObjectIterator<T> input = this.input;
	final TypeSerializer<T> serializer = this.serializer;
	final SpillingBuffer buffer = this.buffer;
	
	try {
		T record = serializer.createInstance();
		
		while (this.running && ((record = input.next(record)) != null)) {
			serializer.serialize(record, buffer);
		}
		
		TempBarrier.this.writingDone();
	}
	catch (Throwable t) {
		TempBarrier.this.setException(t);
	}
}
 
开发者ID:citlab,项目名称:vs.msc.ws14,代码行数:19,代码来源:TempBarrier.java

示例5: TempBarrier

import org.apache.flink.runtime.io.disk.SpillingBuffer; //导入依赖的package包/类
public TempBarrier(AbstractInvokable owner, MutableObjectIterator<T> input, TypeSerializerFactory<T> serializerFactory,
		MemoryManager memManager, IOManager ioManager, int numPages) throws MemoryAllocationException
{
	this.serializer = serializerFactory.getSerializer();
	this.memManager = memManager;
	
	this.memory = new ArrayList<MemorySegment>(numPages);
	memManager.allocatePages(owner, this.memory, numPages);
	
	this.buffer = new SpillingBuffer(ioManager, new ListMemorySegmentSource(this.memory), memManager.getPageSize());
	this.tempWriter = new TempWritingThread(input, serializerFactory.getSerializer(), this.buffer);
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:13,代码来源:TempBarrier.java

示例6: TempWritingThread

import org.apache.flink.runtime.io.disk.SpillingBuffer; //导入依赖的package包/类
private TempWritingThread(MutableObjectIterator<T> input, TypeSerializer<T> serializer, SpillingBuffer buffer) {
	super("Temp writer");
	setDaemon(true);
	
	this.input = input;
	this.serializer = serializer;
	this.buffer = buffer;
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:9,代码来源:TempBarrier.java


注:本文中的org.apache.flink.runtime.io.disk.SpillingBuffer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。