org.apache.pig.backend.hadoop.executionengine.mapReduceLayer
Class MapReduceOper

java.lang.Object
  extended by org.apache.pig.impl.plan.Operator<MROpPlanVisitor>
      extended by org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceOper
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Operator>

public class MapReduceOper
extends Operator<MROpPlanVisitor>

An operator model for a Map Reduce job. Acts as a host to the plans that will execute in map, reduce and optionally combine phases. These will be embedded in the MROperPlan in order to capture the dependecies amongst jobs.

See Also:
Serialized Form

Field Summary
 PhysicalPlan combinePlan
           
 byte mapKeyType
           
 PhysicalPlan mapPlan
           
 PhysicalPlan reducePlan
           
 List<String> UDFs
           
 
Fields inherited from class org.apache.pig.impl.plan.Operator
mKey
 
Constructor Summary
MapReduceOper(OperatorKey k)
           
 
Method Summary
 int getFragment()
           
 String getQuantFile()
           
 FileSpec[] getReplFiles()
           
 boolean[] getSortOrder()
           
 boolean isFrjoin()
           
 boolean isGlobalSort()
           
 boolean isLimitAfterSort()
           
 boolean isMapDone()
           
 boolean isReduceDone()
           
 boolean isStreamInMap()
           
 boolean isStreamInReduce()
           
 String name()
          Uses the string representation of the component plans to identify itself.
 boolean needsDistinctCombiner()
           
 void setFragment(int fragment)
           
 void setFrjoin(boolean frjoin)
           
 void setGlobalSort(boolean globalSort)
           
 void setLimitAfterSort(boolean las)
           
 void setMapDone(boolean mapDone)
           
 void setMapDoneMultiple(boolean mapDone)
           
 void setMapDoneSingle(boolean mapDone)
           
 void setNeedsDistinctCombiner(boolean nic)
           
 void setQuantFile(String quantFile)
           
 void setReduceDone(boolean reduceDone)
           
 void setReplFiles(FileSpec[] replFiles)
           
 void setSortOrder(boolean[] sortOrder)
           
 void setStreamInMap(boolean streamInMap)
           
 void setStreamInReduce(boolean streamInReduce)
           
 boolean supportsMultipleInputs()
          Indicates whether this operator supports multiple inputs.
 boolean supportsMultipleOutputs()
          Indicates whether this operator supports multiple outputs.
 void visit(MROpPlanVisitor v)
          Visit this node with the provided visitor.
 
Methods inherited from class org.apache.pig.impl.plan.Operator
clone, compareTo, equals, getOperatorKey, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

mapPlan

public PhysicalPlan mapPlan

reducePlan

public PhysicalPlan reducePlan

combinePlan

public PhysicalPlan combinePlan

mapKeyType

public byte mapKeyType

UDFs

public List<String> UDFs
Constructor Detail

MapReduceOper

public MapReduceOper(OperatorKey k)
Method Detail

name

public String name()
Uses the string representation of the component plans to identify itself.

Specified by:
name in class Operator<MROpPlanVisitor>

supportsMultipleInputs

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

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

supportsMultipleOutputs

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

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

visit

public void visit(MROpPlanVisitor v)
           throws VisitorException
Description copied from class: Operator
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<MROpPlanVisitor>
Parameters:
v - Visitor to visit with.
Throws:
VisitorException - if the visitor has a problem.

isMapDone

public boolean isMapDone()

setMapDone

public void setMapDone(boolean mapDone)

setMapDoneSingle

public void setMapDoneSingle(boolean mapDone)
                      throws PlanException
Throws:
PlanException

setMapDoneMultiple

public void setMapDoneMultiple(boolean mapDone)
                        throws PlanException
Throws:
PlanException

isReduceDone

public boolean isReduceDone()

setReduceDone

public void setReduceDone(boolean reduceDone)

isGlobalSort

public boolean isGlobalSort()

setGlobalSort

public void setGlobalSort(boolean globalSort)

isLimitAfterSort

public boolean isLimitAfterSort()

setLimitAfterSort

public void setLimitAfterSort(boolean las)

needsDistinctCombiner

public boolean needsDistinctCombiner()

setNeedsDistinctCombiner

public void setNeedsDistinctCombiner(boolean nic)

getQuantFile

public String getQuantFile()

setQuantFile

public void setQuantFile(String quantFile)

setSortOrder

public void setSortOrder(boolean[] sortOrder)

getSortOrder

public boolean[] getSortOrder()

isStreamInMap

public boolean isStreamInMap()
Returns:
whether there is a POStream in the map plan

setStreamInMap

public void setStreamInMap(boolean streamInMap)
Parameters:
streamInMap - the streamInMap to set

isStreamInReduce

public boolean isStreamInReduce()
Returns:
whether there is a POStream in the reduce plan

setStreamInReduce

public void setStreamInReduce(boolean streamInReduce)
Parameters:
streamInReduce - the streamInReduce to set

getFragment

public int getFragment()

setFragment

public void setFragment(int fragment)

isFrjoin

public boolean isFrjoin()

setFrjoin

public void setFrjoin(boolean frjoin)

getReplFiles

public FileSpec[] getReplFiles()

setReplFiles

public void setReplFiles(FileSpec[] replFiles)


Copyright © ${year} The Apache Software Foundation