@Override
      public Object process(Node nd, Stack<Node> stack,
                            NodeProcessorCtx ctx, Object... nodeOutputs) throws SemanticException {
        Operator<? extends OperatorDesc> op = (Operator<? extends OperatorDesc>) nd;
        LOG.info("Walk to operator " + op.getIdentifier() + " "
            + op.getName() + ". No actual work to do");
        CorrelationNodeProcCtx correlationCtx = (CorrelationNodeProcCtx) ctx;
        if (op.getName().equals(MapJoinOperator.getOperatorName())) {
          correlationCtx.setAbort(true);
          correlationCtx.getAbortReasons().add("Found MAPJOIN");
        }
        if (op.getName().equals(FileSinkOperator.getOperatorName())) {
          correlationCtx.incrementFileSinkOperatorCount();
        }
        return null;
      }
Start to exploit Job Flow Correlation from op.
Example: here is the operator tree we have ...
      JOIN2
     /    \
    RS4   RS5
   /        \
  GBY1     JOIN1
   |       /    \
  RS1     RS2   RS3
The op will be RS4. If we can execute GBY1, JOIN1, and JOIN2 in
the same reducer. This method will return [RS1, RS2, RS3].
@param op
@param correlationCtx
@param correlation
@return
@throws SemanticException
ql/src/java/org/apache/hadoop/hive/ql/optimizer/correlation/CorrelationOptimizer.java