Examples of RandomIntPairGenerator


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

    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
    IntPair record = new IntPair();
    int num = -1;
    do {
      generator.next(record);
      num++;
    }
    while (sorter.write(record) && num < NUM_RECORDS);
   
    QuickSort qs = new QuickSort();
View Full Code Here

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

  public void testSpillingSortWithIntermediateMergeIntPair() throws Exception {
    // amount of pairs
    final int PAIRS = 50000000;

    // comparator
    final RandomIntPairGenerator generator = new RandomIntPairGenerator(12345678, PAIRS);
   
    final TypeSerializerFactory<IntPair> serializerFactory = new IntPairSerializer.IntPairSerializerFactory();
    final TypeComparator<IntPair> comparator = new IntPairComparator();
   
    // merge iterator
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.