Examples of DummyInvokable


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

 
  @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

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

   * 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

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

   * 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

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

  }

  @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

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

  }

  @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

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

  }

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

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

        TypeComparator<String> comparator = new StringComparator(true);
       
        reader = new BufferedReader(new FileReader(input));
        MutableObjectIterator<String> inputIterator = new StringReaderMutableObjectIterator(reader);
       
        sorter = new UnilateralSortMerger<String>(mm, ioMan, inputIterator, new DummyInvokable(),
            new RuntimeStatelessSerializerFactory<String>(serializer, String.class), comparator, 1.0, 4, 0.8f);

        MutableObjectIterator<String> sortedData = sorter.getIterator();
       
        reader.close();
View Full Code Here

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

        TypeComparator<Tuple2<String, String[]>> comparator = typeInfo.createComparator(new int[] { 0 }, new boolean[] { true }, 0);
       
        reader = new BufferedReader(new FileReader(input));
        MutableObjectIterator<Tuple2<String, String[]>> inputIterator = new StringTupleReaderMutableObjectIterator(reader);
       
        sorter = new UnilateralSortMerger<Tuple2<String, String[]>>(mm, ioMan, inputIterator, new DummyInvokable(),
            new RuntimeStatelessSerializerFactory<Tuple2<String, String[]>>(serializer, (Class<Tuple2<String, String[]>>) (Class<?>) Tuple2.class), comparator, 1.0, 4, 0.8f);

       
       
        // use this part to verify that all if good when sorting in memory
View Full Code Here

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);
   
    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

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

 
  @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
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.