Examples of RecordComparator


Examples of org.apache.flink.api.common.typeutils.record.RecordComparator

  public void beforeTest() {
    this.memoryManager = new DefaultMemoryManager(MEMORY_SIZE, 1);
    this.ioManager = new IOManager();
   
    this.serializerFactory = RecordSerializerFactory.get();
    this.comparator = new RecordComparator(new int[] {0}, new Class[] {TestData.Key.class});
  }
View Full Code Here

Examples of org.apache.flink.api.common.typeutils.record.RecordComparator

    }
  }

  private NormalizedKeySorter<Record> newSortBuffer(List<MemorySegment> memory) throws Exception
  {
    @SuppressWarnings("unchecked")
    RecordComparator accessors = new RecordComparator(new int[] {0}, new Class[]{Key.class});
    return new NormalizedKeySorter<Record>(RecordSerializer.get(), accessors, memory);
  }
View Full Code Here

Examples of org.apache.flink.api.common.typeutils.record.RecordComparator

  public void testSortShortStringKeys() throws Exception
  {
    final int numSegments = MEMORY_SIZE / MEMORY_PAGE_SIZE;
    final List<MemorySegment> memory = this.memoryManager.allocatePages(new DummyInvokable(), numSegments);
   
    @SuppressWarnings("unchecked")
    RecordComparator accessors = new RecordComparator(new int[] {1}, new Class[]{Value.class});
    NormalizedKeySorter<Record> sorter = new NormalizedKeySorter<Record>(RecordSerializer.get(), accessors, memory);
   
    TestData.Generator generator = new TestData.Generator(SEED, KEY_MAX, 5, KeyMode.RANDOM,
      ValueMode.FIX_LENGTH);
   
View Full Code Here

Examples of org.apache.flink.api.common.typeutils.record.RecordComparator

  public void testSortLongStringKeys() throws Exception
  {
    final int numSegments = MEMORY_SIZE / MEMORY_PAGE_SIZE;
    final List<MemorySegment> memory = this.memoryManager.allocatePages(new DummyInvokable(), numSegments);
   
    @SuppressWarnings("unchecked")
    RecordComparator accessors = new RecordComparator(new int[] {1}, new Class[]{Value.class});
    NormalizedKeySorter<Record> sorter = new NormalizedKeySorter<Record>(RecordSerializer.get(), accessors, memory);
   
    TestData.Generator generator = new TestData.Generator(SEED, KEY_MAX, VALUE_LENGTH, KeyMode.RANDOM,
      ValueMode.FIX_LENGTH);
   
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.