private static int getNumberOfReducers(MapredWork mrwork, HiveConf conf) {
    if (mrwork.getReduceWork() == null) {
      return 0;
    }

    if (mrwork.getReduceWork().getNumReduceTasks() >= 0) {
      return mrwork.getReduceWork().getNumReduceTasks();
    }

    return conf.getIntVar(HiveConf.ConfVars.HADOOP_NUM_REDUCERS);
  }
Make a best guess at trying to find the number of reducers
ql/src/java/org/apache/hadoop/hive/ql/parse/MapReduceCompiler.java