code: public void setGroupingComparatorClass(Class<? extends RawComparator> cls
                                           ) throws IllegalStateException {
      ensureState(JobState.DEFINE);
      conf.setOutputValueGroupingComparator(cls);
    }
docs: Define the comparator that controls which keys are grouped together
  for a single call to
  {@link Reducer#reduce(Object, Iterable,
  org.apache.hadoop.mapreduce.Reducer.Context)}
  @param cls the raw comparator to use
  @throws IllegalStateException if the job is submitted