Examples of Run


Examples of lupos.datastructures.sort.run.Run

       
        while(listOfRunsToBeMerged.size()<ExternalParallelSorter.this.NUMBER_OF_RUNS_TO_JOIN){
          listOfRunsToBeMerged.add(level.remove());         
        }
       
        Run resultOfMerge = ExternalParallelSorter.this.runs.merge(listOfRunsToBeMerged, true);
       
        // put the merged run to one level higher (and recursively merge there the runs if enough are there)
        this.addToLevel(addLevel + 1, resultOfMerge);       
      }
     
View Full Code Here

Examples of lupos.datastructures.sort.run.Run

        // get one of the biggest runs for storing it on disk and free it in memory...
        int levelnr=this.levels.size();
        do {
          levelnr--;
        } while(levelnr>0 && this.levels.get(levelnr).size()==0);
        final Run runOnDisk;
        if(levelnr==0 || addLevel>=levelnr){
          System.err.println("ExternalParallelMergeSort: Heap space to low or FREE_MEMORY_LIMIT to high...");
          runOnDisk = toBeAdded;
          flag = true;
        } else {
View Full Code Here

Examples of lupos.datastructures.sort.run.Run

    }
  }
 
  public void finishInitialRun() throws InterruptedException{
    if(!this.run.isEmpty()){
      Run sortedRun = this.run.sort();
      this.initialRunsLevel0.put(sortedRun);
      this.run = this.runs.createRun();
    }
  }
View Full Code Here

Examples of lupos.datastructures.sort.run.Run

    final Iterator<String>[] iterators = new Iterator[runs.size()];
    // a heap is used to get every time the smallest under the current elements of the different runs
    // (this allows to have logarithmical complexity (concerning the number of runs) for getting the next smallest element)
    final Heap<Container> heap = Heap.createInstance(runs.size(), true, Heap.HEAPTYPE.OPTIMIZEDSEQUENTIAL);
    for(int i=0; i<runs.size(); i++){
      final Run run = runs.get(i);
      maxsize += run.size();
      iterators[i] = run.iterator();
      // assuming the different runs are non-empty!
      heap.add(new Container(i, iterators[i].next()));
    }
    final Iterator<String> iterator = new ImmutableIterator<String>(){
View Full Code Here

Examples of org.apache.etch.interoptester.Run

 
  /** @throws Exception */
  @Test
  public void parse4() throws Exception
  {
    Run r = Run.parse( itest, parseXml( "<run test=\"foo\"/>" ) );
    assertSame( itest, r.itest() );
    assertEquals( "foo", r.test() );
    assertEquals( 0, r.args().size() );
  }
View Full Code Here

Examples of org.apache.etch.interoptester.Run

 
  /** @throws Exception */
  @Test
  public void parse5() throws Exception
  {
    Run r = Run.parse( itest, parseXml( "<run test=\"bar\"></run>" ) );
    assertSame( itest, r.itest() );
    assertEquals( "bar", r.test() );
    assertEquals( 0, r.args().size() );
  }
View Full Code Here

Examples of org.apache.etch.interoptester.Run

  /** @throws Exception */
  @Test( expected=RuntimeException.class )
  public void run1() throws Exception
  {
    // test bad not found
    Run r = Run.parse( itest, parseXml( "<run test=\"bad\"/>" ) );
    r.run( new HashMap<String, String>() );
  }
View Full Code Here

Examples of org.apache.etch.interoptester.Run

 
  /** @throws Exception */
  @Test
  public void run2() throws Exception
  {
    Run r = Run.parse( itest, parseXml( "<run test=\"foo\"/>" ) );
    assertNull( test );
    r.run( new HashMap<String, String>() );
    assertEquals( "foo", test.name() );
    assertEquals( 0, test.args.size() );
  }
View Full Code Here

Examples of org.apache.etch.interoptester.Run

 
  /** @throws Exception */
  @Test
  public void run4() throws Exception
  {
    Run r = Run.parse( itest, parseXml( "<run test=\"foo\"><arg name=\"abc\" value=\"234\"/></run>" ) );
    assertNull( test );
    r.run( new HashMap<String, String>() );
    assertEquals( "foo", test.name() );
    assertEquals( 1, test.args.size() );
    assertEquals( "234", test.args.get( "abc" ) );
  }
View Full Code Here

Examples of org.apache.etch.interoptester.Run

 
  /** @throws Exception */
  @Test
  public void run5() throws Exception
  {
    Run r = Run.parse( itest, parseXml( "<run test=\"foo\"><arg name=\"abc\">345</arg></run>" ) );
    assertNull( test );
    r.run( new HashMap<String, String>() );
    assertEquals( "foo", test.name() );
    assertEquals( 1, test.args.size() );
    assertEquals( "345", test.args.get( "abc" ) );
  }
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.