public static ExternalSorter create(Options options) {
    return options.getSorterType() == Options.SorterType.HADOOP
        ? HadoopExternalSorter.create(options)
        : NativeExternalSorter.create(options);
  }
@Test
  public void testRandom() throws Exception {
    SorterTestUtils.testRandom(
        () ->
            ExternalSorter.create(
                new ExternalSorter.Options()
                    .setTempLocation(getTmpLocation().toString())
                    .setSorterType(sorterType)),
        1,
        1000000);
  }