Examples of DummyInvokable


Examples of eu.stratosphere.pact.runtime.test.util.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 eu.stratosphere.pact.runtime.test.util.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, 1024 * 1024, 4, 0.8f);

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

Examples of eu.stratosphere.pact.runtime.test.util.DummyInvokable

        TypeComparator<Tuple2<String, String[]>> comparator = typeInfo.createComparator(new int[] { 0 }, new boolean[] { true } );
       
        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, 1024 * 1024, 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.memory.DefaultMemoryManagerTest.DummyInvokable

   
    try {
      final Channel.ID channelID = this.ioManager.createChannel();
      final BlockChannelWriter writer = this.ioManager.createBlockChannelWriter(channelID);
     
      MemorySegment memSeg = this.memoryManager.allocatePages(new DummyInvokable(), 1).get(0);
     
      for (int i = 0; i < NUM_IOS; i++) {
        for (int pos = 0; pos < memSeg.size(); pos += 4) {
          memSeg.putInt(pos, i);
        }
View Full Code Here

Examples of org.apache.flink.runtime.memory.DefaultMemoryManagerTest.DummyInvokable

  {
    final int NUM_IOS = 1111;
    final int NUM_SEGS = 16;
   
    try {
      final List<MemorySegment> memSegs = this.memoryManager.allocatePages(new DummyInvokable(), NUM_SEGS);
      final Channel.ID channelID = this.ioManager.createChannel();
      final BlockChannelWriter writer = this.ioManager.createBlockChannelWriter(channelID);
     
      for (int i = 0; i < NUM_IOS; i++) {
        final MemorySegment memSeg = memSegs.isEmpty() ? writer.getNextReturnedSegment() : memSegs.remove(0);
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);
   
    FixedLengthRecordSorter<IntPair> sorter = newSortBuffer(memory);
    RandomIntPairGenerator generator = new RandomIntPairGenerator(SEED);
   
//    long startTime = System.currentTimeMillis();
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);
   
    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

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

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

   * 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

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

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