Package eu.stratosphere.pact.runtime.test.util

Examples of eu.stratosphere.pact.runtime.test.util.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);
   
    NormalizedKeySorter<Record> sorter = newSortBuffer(memory);
    TestData.Generator generator = new TestData.Generator(SEED, KEY_MAX, VALUE_LENGTH, KeyMode.RANDOM,
      ValueMode.RANDOM_LENGTH);
   
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);
   
    NormalizedKeySorter<Record> sorter = newSortBuffer(memory);
    TestData.Generator generator = new TestData.Generator(SEED, KEY_MAX, VALUE_LENGTH, KeyMode.RANDOM,
      ValueMode.RANDOM_LENGTH);
   
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);
   
    NormalizedKeySorter<Record> sorter = newSortBuffer(memory);
    TestData.Generator generator = new TestData.Generator(SEED, KEY_MAX, VALUE_LENGTH, KeyMode.RANDOM, ValueMode.FIX_LENGTH);
   
    // write the buffer full with the first set of records
View Full Code Here

   */
  @Test
  public void testSwap() throws Exception
  {
    final int numSegments = MEMORY_SIZE / MEMORY_PAGE_SIZE;
    final List<MemorySegment> memory = this.memoryManager.allocatePages(new DummyInvokable(), numSegments);
   
    NormalizedKeySorter<Record> sorter = newSortBuffer(memory);
    TestData.Generator generator = new TestData.Generator(SEED, KEY_MAX, VALUE_LENGTH, KeyMode.RANDOM,
      ValueMode.RANDOM_LENGTH);
   
View Full Code Here

   */
  @Test
  public void testCompare() throws Exception
  {
    final int numSegments = MEMORY_SIZE / MEMORY_PAGE_SIZE;
    final List<MemorySegment> memory = this.memoryManager.allocatePages(new DummyInvokable(), numSegments);
   
    NormalizedKeySorter<Record> sorter = newSortBuffer(memory);
    TestData.Generator generator = new TestData.Generator(SEED, KEY_MAX, VALUE_LENGTH, KeyMode.SORTED,
      ValueMode.RANDOM_LENGTH);
   
View Full Code Here

  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);
   
    NormalizedKeySorter<Record> sorter = newSortBuffer(memory);
    TestData.Generator generator = new TestData.Generator(SEED, KEY_MAX, VALUE_LENGTH, KeyMode.RANDOM,
      ValueMode.RANDOM_LENGTH);
   
View Full Code Here

 
  @Test
  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);
   
View Full Code Here

 
  @Test
  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);
   
View Full Code Here

  }

  @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

TOP

Related Classes of eu.stratosphere.pact.runtime.test.util.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.