code: public void setSortComparatorClass(Class<? extends RawComparator> cls
                                       ) throws IllegalStateException {
      ensureState(JobState.DEFINE);
      conf.setOutputKeyComparatorClass(cls);
    }
docs: Define the comparator that controls how the keys are sorted before they
  are passed to the {@link Reducer}.
  @param cls the raw comparator
  @throws IllegalStateException if the job is submitted