Package org.apache.hadoop.util

Examples of org.apache.hadoop.util.QuickSort.sort()


  public void sort(SelectionVector2 vector2){
    QuickSort qs = new QuickSort();
    Stopwatch watch = new Stopwatch();
    watch.start();
    if (vector2.getCount() > 0) {
      qs.sort(this, 0, vector2.getCount());
    }
    logger.debug("Took {} us to sort {} records", watch.elapsed(TimeUnit.MICROSECONDS), vector2.getCount());
  }

  @Override
View Full Code Here


  public long doSort(){
    QuickSort qs = new QuickSort();
    ByteSortable b = new ByteSortable();
    long nano = System.nanoTime();
    qs.sort(b, 0, RECORD_COUNT);
    return System.nanoTime() - nano;
  }

  private class ByteSortable implements IndexedSortable{
    final byte[] space = new byte[RECORD_SIZE];
View Full Code Here

      return;
    }
    // quick sort the offsets
    OffsetSortable sortableObj = new OffsetSortable(memBlock, kvbuffer);
    QuickSort quickSort = new QuickSort();
    quickSort.sort(sortableObj, 0, memBlock.currentPtr);
  }

  protected void sortIndividualMemoryBlock(List<MemoryBlock> memBlks) {
    if (memBlks == null) {
      return;
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.