org.apache.flink.runtime.operators.testutils.MutableObjectIteratorWrapper Java Examples

The following examples show how to use org.apache.flink.runtime.operators.testutils.MutableObjectIteratorWrapper. 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: BlockResettableMutableObjectIteratorTest.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@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 = new MutableObjectIteratorWrapper(this.objects.iterator());
}
 
Example #2
Source File: SpillingResettableMutableObjectIteratorTest.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Before
public void startup() {
	// set up IO and memory manager
	this.memman = new MemoryManager(MEMORY_CAPACITY, 1);
	this.ioman = new IOManagerAsync();

	// create test objects
	final ArrayList<Record> objects = new ArrayList<Record>(NUM_TESTRECORDS);

	for (int i = 0; i < NUM_TESTRECORDS; ++i) {
		Record tmp = new Record(new IntValue(i));
		objects.add(tmp);
	}
	this.reader = new MutableObjectIteratorWrapper(objects.iterator());
}
 
Example #3
Source File: BlockResettableMutableObjectIteratorTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@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 = new MutableObjectIteratorWrapper(this.objects.iterator());
}
 
Example #4
Source File: SpillingResettableMutableObjectIteratorTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Before
public void startup() {
	// set up IO and memory manager
	this.memman = new MemoryManager(MEMORY_CAPACITY, 1);
	this.ioman = new IOManagerAsync();

	// create test objects
	final ArrayList<Record> objects = new ArrayList<Record>(NUM_TESTRECORDS);

	for (int i = 0; i < NUM_TESTRECORDS; ++i) {
		Record tmp = new Record(new IntValue(i));
		objects.add(tmp);
	}
	this.reader = new MutableObjectIteratorWrapper(objects.iterator());
}
 
Example #5
Source File: BlockResettableMutableObjectIteratorTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Before
public void startup() {
	// set up IO and memory manager
	this.memman = MemoryManagerBuilder.newBuilder().setMemorySize(MEMORY_CAPACITY).build();
	
	// 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 = new MutableObjectIteratorWrapper(this.objects.iterator());
}
 
Example #6
Source File: SpillingResettableMutableObjectIteratorTest.java    From flink with Apache License 2.0 5 votes vote down vote up
@Before
public void startup() {
	// set up IO and memory manager
	this.memman = MemoryManagerBuilder.newBuilder().setMemorySize(MEMORY_CAPACITY).build();
	this.ioman = new IOManagerAsync();

	// create test objects
	final ArrayList<Record> objects = new ArrayList<Record>(NUM_TESTRECORDS);

	for (int i = 0; i < NUM_TESTRECORDS; ++i) {
		Record tmp = new Record(new IntValue(i));
		objects.add(tmp);
	}
	this.reader = new MutableObjectIteratorWrapper(objects.iterator());
}