public void checkMultiReduceOperator(boolean rewriteObject) throws JSONException {
    // check if it is a reduce vertex and its children is more than 1;
    // check if all the child ops are reduce output operators
    numReduceOp = 0;
    for (Op op : this.outputOps) {
      if (op.type == OpType.RS) {
        if (rewriteObject) {
          Vertex outputVertex = this.stage.vertices.get(op.outputVertexName);
          if (outputVertex != null && outputVertex.inputOps.size() > 0) {
            JSONArray array = new JSONArray();
            for (Op inputOp : outputVertex.inputOps) {
              array.put(inputOp.operatorId);
            }
            op.opObject.put("outputOperator:", array);
          }
        }
        numReduceOp++;
      }
    }
  }
We check if a vertex has multiple reduce operators.
@throws JSONException
common/src/java/org/apache/hadoop/hive/common/jsonexplain/Vertex.java