當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。