Package org.apache.flink.runtime.operators.testutils

Examples of org.apache.flink.runtime.operators.testutils.DummyInvokable


  }

  @Test
  public void testWriteAndRead() throws Exception {
    final int numSegments = MEMORY_SIZE / MEMORY_PAGE_SIZE;
    final List<MemorySegment> memory = this.memoryManager.allocatePages(new DummyInvokable(), numSegments);
   
    FixedLengthRecordSorter<IntPair> sorter = newSortBuffer(memory);
    RandomIntPairGenerator generator = new RandomIntPairGenerator(SEED);
   
//    long startTime = System.currentTimeMillis();
View Full Code Here


  }
 
  @Test
  public void testWriteAndIterator() throws Exception {
    final int numSegments = MEMORY_SIZE / MEMORY_PAGE_SIZE;
    final List<MemorySegment> memory = this.memoryManager.allocatePages(new DummyInvokable(), numSegments);
   
    FixedLengthRecordSorter<IntPair> sorter = newSortBuffer(memory);
    RandomIntPairGenerator generator = new RandomIntPairGenerator(SEED);
   
    // write the records
View Full Code Here

  }
 
  @Test
  public void testReset() throws Exception {
    final int numSegments = MEMORY_SIZE / MEMORY_PAGE_SIZE;
    final List<MemorySegment> memory = this.memoryManager.allocatePages(new DummyInvokable(), numSegments);
   
    FixedLengthRecordSorter<IntPair> sorter = newSortBuffer(memory);
    RandomIntPairGenerator generator = new RandomIntPairGenerator(SEED);
   
    // write the buffer full with the first set of records
View Full Code Here

   * and compares for equality.
   */
  @Test
  public void testSwap() throws Exception {
    final int numSegments = MEMORY_SIZE / MEMORY_PAGE_SIZE;
    final List<MemorySegment> memory = this.memoryManager.allocatePages(new DummyInvokable(), numSegments);
   
    FixedLengthRecordSorter<IntPair> sorter = newSortBuffer(memory);
    RandomIntPairGenerator generator = new RandomIntPairGenerator(SEED);
   
    // write the records
View Full Code Here

   * ones.
   */
  @Test
  public void testCompare() throws Exception {
    final int numSegments = MEMORY_SIZE / MEMORY_PAGE_SIZE;
    final List<MemorySegment> memory = this.memoryManager.allocatePages(new DummyInvokable(), numSegments);
   
    FixedLengthRecordSorter<IntPair> sorter = newSortBuffer(memory);
    UniformIntPairGenerator generator = new UniformIntPairGenerator(Integer.MAX_VALUE, 1, true);
   
    // write the records
View Full Code Here

 
  @Test
  public void testSort() throws Exception {
    final int NUM_RECORDS = 559273;
    final int numSegments = MEMORY_SIZE / MEMORY_PAGE_SIZE;
    final List<MemorySegment> memory = this.memoryManager.allocatePages(new DummyInvokable(), numSegments);
   
    FixedLengthRecordSorter<IntPair> sorter = newSortBuffer(memory);
    RandomIntPairGenerator generator = new RandomIntPairGenerator(SEED);
   
    // write the records
View Full Code Here

   * has to be written to disk.
   */
  @Test
  public void testResettableIterator() {
    try {
      final AbstractInvokable memOwner = new DummyInvokable();
 
      // create the resettable Iterator
      SpillingResettableMutableObjectIterator<Record> iterator = new SpillingResettableMutableObjectIterator<Record>(
        this.reader, this.serializer, this.memman, this.ioman, 2, memOwner);
 
View Full Code Here

   * Tests the resettable iterator with enough memory so that all data is kept locally in memory.
   */
  @Test
  public void testResettableIteratorInMemory() {
    try {
      final AbstractInvokable memOwner = new DummyInvokable();
 
      // create the resettable Iterator
      SpillingResettableMutableObjectIterator<Record> iterator = new SpillingResettableMutableObjectIterator<Record>(
        this.reader, this.serializer, this.memman, this.ioman, 20, memOwner);
     
View Full Code Here

  }

  @Test
  public void testSerialBlockResettableIterator() throws Exception
  {
    final AbstractInvokable memOwner = new DummyInvokable();
    // create the resettable Iterator
    final BlockResettableIterator<Record> iterator = new BlockResettableIterator<Record>(
        this.memman, this.reader, this.serializer, 1, memOwner);
    // open the iterator
    iterator.open();
View Full Code Here

  }

  @Test
  public void testDoubleBufferedBlockResettableIterator() throws Exception
  {
    final AbstractInvokable memOwner = new DummyInvokable();
    // create the resettable Iterator
    final BlockResettableIterator<Record> iterator = new BlockResettableIterator<Record>(
        this.memman, this.reader, this.serializer, 2, memOwner);
    // open the iterator
    iterator.open();
View Full Code Here

TOP

Related Classes of org.apache.flink.runtime.operators.testutils.DummyInvokable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.