ExternalSorter implements Sorter { public static ExternalSorter create(Options options) { return options.getSorterType() == Options.SorterType.HADOOP ? HadoopExternalSorter.create(options) : NativeExternalSorter.create(options); } ExternalSorter(Options options); static ExternalSorter create(Options options);  }
@Test public void testEmpty() throws Exception { SorterTestUtils.testEmpty( ExternalSorter.create( new ExternalSorter.Options() .setTempLocation(getTmpLocation().toString()) .setSorterType(sorterType))); }
@Test public void testSingleElement() throws Exception { SorterTestUtils.testSingleElement( ExternalSorter.create( new ExternalSorter.Options() .setTempLocation(getTmpLocation().toString()) .setSorterType(sorterType))); }
@Test public void testEmptyKeyValueElement() throws Exception { SorterTestUtils.testEmptyKeyValueElement( ExternalSorter.create( new ExternalSorter.Options() .setTempLocation(getTmpLocation().toString()) .setSorterType(sorterType))); }
@Test public void testMultipleIterations() throws Exception { SorterTestUtils.testMultipleIterations( ExternalSorter.create( new ExternalSorter.Options() .setTempLocation(getTmpLocation().toString()) .setSorterType(sorterType))); }
@Test public void testRandom() throws Exception { SorterTestUtils.testRandom( () -> ExternalSorter.create( new ExternalSorter.Options() .setTempLocation(getTmpLocation().toString()) .setSorterType(sorterType)), 1, 1000000); }
@Test public void testAddAfterSort() throws Exception { SorterTestUtils.testAddAfterSort( ExternalSorter.create( new ExternalSorter.Options() .setTempLocation(getTmpLocation().toString()) .setSorterType(sorterType)), thrown); fail(); }
@Test public void testSortTwice() throws Exception { SorterTestUtils.testSortTwice( ExternalSorter.create( new ExternalSorter.Options() .setTempLocation(getTmpLocation().toString()) .setSorterType(sorterType)), thrown); fail(); }
@Test public void testEmpty() throws Exception { SorterTestUtils.testEmpty( ExternalSorter.create( new ExternalSorter.Options() .setTempLocation(tmpLocation.toString()) .setSorterType(sorterType))); }
@Test public void testSingleElement() throws Exception { SorterTestUtils.testSingleElement( ExternalSorter.create( new ExternalSorter.Options() .setTempLocation(tmpLocation.toString()) .setSorterType(sorterType))); }
@Test public void testEmptyKeyValueElement() throws Exception { SorterTestUtils.testEmptyKeyValueElement( ExternalSorter.create( new ExternalSorter.Options() .setTempLocation(tmpLocation.toString()) .setSorterType(sorterType))); }
@Test public void testMultipleIterations() throws Exception { SorterTestUtils.testMultipleIterations( ExternalSorter.create( new ExternalSorter.Options() .setTempLocation(tmpLocation.toString()) .setSorterType(sorterType))); }
@Test public void testRandom() throws Exception { SorterTestUtils.testRandom( () -> ExternalSorter.create( new ExternalSorter.Options() .setTempLocation(tmpLocation.toString()) .setSorterType(sorterType)), 1, 1000000); }
@Test public void testAddAfterSort() throws Exception { SorterTestUtils.testAddAfterSort( ExternalSorter.create( new ExternalSorter.Options() .setTempLocation(tmpLocation.toString()) .setSorterType(sorterType)), thrown); fail(); }
@Test public void testSortTwice() throws Exception { SorterTestUtils.testSortTwice( ExternalSorter.create( new ExternalSorter.Options() .setTempLocation(tmpLocation.toString()) .setSorterType(sorterType)), thrown); fail(); }