Search in sources :

Example 1 with QuickSort

use of org.apache.hadoop.util.QuickSort in project drill by axbaretto.

the class SampleSortTemplate method sort.

@Override
public void sort(SelectionVector2 vector2, VectorContainer container) {
    QuickSort qs = new QuickSort();
    qs.sort(this, 0, vector2.getCount());
}
Also used : QuickSort(org.apache.hadoop.util.QuickSort)

Example 2 with QuickSort

use of org.apache.hadoop.util.QuickSort in project drill by axbaretto.

the class SortTest method doSort.

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;
}
Also used : QuickSort(org.apache.hadoop.util.QuickSort)

Example 3 with QuickSort

use of org.apache.hadoop.util.QuickSort in project drill by apache.

the class SingleBatchSorterTemplate method sort.

@Override
public void sort(SelectionVector2 vector2) {
    QuickSort qs = new QuickSort();
    Stopwatch watch = Stopwatch.createStarted();
    if (vector2.getCount() > 0) {
        qs.sort(this, 0, vector2.getCount());
    }
    logger.debug("Took {} us to sort {} records", watch.elapsed(TimeUnit.MICROSECONDS), vector2.getCount());
}
Also used : QuickSort(org.apache.hadoop.util.QuickSort) Stopwatch(org.apache.drill.shaded.guava.com.google.common.base.Stopwatch)

Example 4 with QuickSort

use of org.apache.hadoop.util.QuickSort in project drill by apache.

the class SampleSortTemplate method sort.

@Override
public void sort(SelectionVector2 vector2, VectorContainer container) {
    QuickSort qs = new QuickSort();
    qs.sort(this, 0, vector2.getCount());
}
Also used : QuickSort(org.apache.hadoop.util.QuickSort)

Example 5 with QuickSort

use of org.apache.hadoop.util.QuickSort in project drill by axbaretto.

the class SingleBatchSorterTemplate method sort.

@Override
public void sort(SelectionVector2 vector2) {
    QuickSort qs = new QuickSort();
    Stopwatch watch = Stopwatch.createStarted();
    if (vector2.getCount() > 0) {
        qs.sort(this, 0, vector2.getCount());
    }
    logger.debug("Took {} us to sort {} records", watch.elapsed(TimeUnit.MICROSECONDS), vector2.getCount());
}
Also used : QuickSort(org.apache.hadoop.util.QuickSort) Stopwatch(com.google.common.base.Stopwatch)

Aggregations

QuickSort (org.apache.hadoop.util.QuickSort)9 Stopwatch (com.google.common.base.Stopwatch)2 Stopwatch (org.apache.drill.shaded.guava.com.google.common.base.Stopwatch)2 Coordinate (com.vividsolutions.jts.geom.Coordinate)1 Geometry (com.vividsolutions.jts.geom.Geometry)1 IndexedSortable (org.apache.hadoop.util.IndexedSortable)1 ExecException (org.apache.pig.backend.executionengine.ExecException)1 DataBag (org.apache.pig.data.DataBag)1 Tuple (org.apache.pig.data.Tuple)1