org.apache.hadoop.hive.ql.lib
Class DefaultRuleDispatcher

java.lang.Object
  extended by org.apache.hadoop.hive.ql.lib.DefaultRuleDispatcher
All Implemented Interfaces:
Dispatcher

public class DefaultRuleDispatcher
extends Object
implements Dispatcher

Dispatches calls to relevant method in processor. The user registers various rules with the dispatcher, and the processor corresponding to closest matching rule is fired.


Constructor Summary
DefaultRuleDispatcher(NodeProcessor defaultProc, Map<Rule,NodeProcessor> rules, NodeProcessorCtx procCtx)
          Constructor.
 
Method Summary
 Object dispatch(Node nd, Stack<Node> ndStack, Object... nodeOutputs)
          Dispatcher function.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRuleDispatcher

public DefaultRuleDispatcher(NodeProcessor defaultProc,
                             Map<Rule,NodeProcessor> rules,
                             NodeProcessorCtx procCtx)
Constructor.

Parameters:
defaultProc - default processor to be fired if no rule matches
rules - operator processor that handles actual processing of the node
procCtx - operator processor context, which is opaque to the dispatcher
Method Detail

dispatch

public Object dispatch(Node nd,
                       Stack<Node> ndStack,
                       Object... nodeOutputs)
                throws SemanticException
Dispatcher function.

Specified by:
dispatch in interface Dispatcher
Parameters:
nd - operator to process
ndStack - the operators encountered so far
nodeOutputs - The argument list of outputs from processing other nodes that are passed to this dispatcher from the walker.
Returns:
Object The return object from the processing call.
Throws:
SemanticException


Copyright © 2014 The Apache Software Foundation. All rights reserved.