public Op getJoinRSOp(Vertex joinVertex) {
    if (outputOps.size() == 0) {
      return null;
    } else if (outputOps.size() == 1) {
      if (outputOps.get(0).type == OpType.RS) {
        return outputOps.get(0);
      } else {
        return null;
      }
    } else {
      for (Op op : outputOps) {
        if (op.type == OpType.RS) {
          if (op.outputVertexName.equals(joinVertex.name)) {
            return op;
          }
        }
      }
      return null;
    }
  }
We check if a vertex has multiple reduce operators.
@throws JSONException
common/src/java/org/apache/hadoop/hive/common/jsonexplain/Vertex.java