org.apache.pig.impl.plan.optimizer
Class RuleOperator

java.lang.Object
  extended by org.apache.pig.impl.plan.Operator<RulePlanVisitor>
      extended by org.apache.pig.impl.plan.optimizer.RuleOperator
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Operator>

public class RuleOperator
extends Operator<RulePlanVisitor>

Parent for all Logical operators.

See Also:
Serialized Form

Nested Class Summary
static class RuleOperator.NodeType
           
 
Field Summary
 
Fields inherited from class org.apache.pig.impl.plan.Operator
mKey
 
Constructor Summary
RuleOperator(Class clazz, OperatorKey k)
           
RuleOperator(Class clazz, RuleOperator.NodeType nodeType, OperatorKey k)
           
 
Method Summary
protected  Object clone()
           
 Class getNodeClass()
          Get the node class of this operator.
 RuleOperator.NodeType getNodeType()
          Get the node type of this operator.
 String name()
           
 void setNodeType(RuleOperator.NodeType type)
          Set the node type of this rule operator.
 boolean supportsMultipleInputs()
          Indicates whether this operator supports multiple inputs.
 boolean supportsMultipleOutputs()
          Indicates whether this operator supports multiple outputs.
 String toString()
           
 void visit(RulePlanVisitor v)
          Visit this node with the provided visitor.
 
Methods inherited from class org.apache.pig.impl.plan.Operator
compareTo, equals, getOperatorKey, getProjectionMap, hashCode, regenerateProjectionMap, rewire, unsetProjectionMap
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RuleOperator

public RuleOperator(Class clazz,
                    OperatorKey k)
Parameters:
clazz - Class type of this node, e.g.: LOFilter.class
k - Operator key to assign to this node.

RuleOperator

public RuleOperator(Class clazz,
                    RuleOperator.NodeType nodeType,
                    OperatorKey k)
Parameters:
clazz - Class type of this node, e.g.: LOFilter.class
nodeType - Node type of this node
k - Operator key to assign to this node.
Method Detail

setNodeType

public final void setNodeType(RuleOperator.NodeType type)
Set the node type of this rule operator.

Parameters:
type - Node type to set this operator to.

getNodeType

public RuleOperator.NodeType getNodeType()
Get the node type of this operator.


getNodeClass

public Class getNodeClass()
Get the node class of this operator.


toString

public String toString()
Overrides:
toString in class Operator<RulePlanVisitor>

visit

public void visit(RulePlanVisitor v)
           throws VisitorException
Visit this node with the provided visitor. This should only be called by the visitor class itself, never directly.

Specified by:
visit in class Operator<RulePlanVisitor>
Parameters:
v - Visitor to visit with.
Throws:
VisitException - if the visitor has a problem.
VisitorException - if the visitor has a problem.

supportsMultipleOutputs

public boolean supportsMultipleOutputs()
Description copied from class: Operator
Indicates whether this operator supports multiple outputs.

Specified by:
supportsMultipleOutputs in class Operator<RulePlanVisitor>
Returns:
true if it does, otherwise false.

supportsMultipleInputs

public boolean supportsMultipleInputs()
Description copied from class: Operator
Indicates whether this operator supports multiple inputs.

Specified by:
supportsMultipleInputs in class Operator<RulePlanVisitor>
Returns:
true if it does, otherwise false.

clone

protected Object clone()
                throws CloneNotSupportedException
Overrides:
clone in class Operator<RulePlanVisitor>
Throws:
CloneNotSupportedException
See Also:
Do not use the clone method directly. Operators are cloned when logical plans are cloned using {@link LogicalPlanCloner}

name

public String name()
Specified by:
name in class Operator<RulePlanVisitor>


Copyright © ${year} The Apache Software Foundation