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()
           
 int getRequestedParallelism()
           
 boolean[] getSecondarySortOrder()
           
 boolean getSkewedJoin()
           
 String getSkewedJoinPartitionFile()
           
 boolean[] getSortOrder()
           
 boolean getUseSecondaryKey()
           
 boolean isEndOfAllInputSetInMap()
           
 boolean isEndOfAllInputSetInReduce()
           
 boolean isFrjoin()
           
 boolean isGlobalSort()
           
 boolean isLimitAfterSort()
           
 boolean isLimitOnly()
           
 boolean isMapDone()
           
 boolean isReduceDone()
           
 boolean isSkewedJoin()
           
 boolean isSplitter()
           
 String name()
          Uses the string representation of the component plans to identify itself.
 boolean needsDistinctCombiner()
           
 void setEndOfAllInputInMap(boolean endOfAllInputInMap)
           
 void setEndOfAllInputInReduce(boolean endOfAllInputInReduce)
           
 void setFragment(int fragment)
           
 void setFrjoin(boolean frjoin)
           
 void setGlobalSort(boolean globalSort)
           
 void setLimitAfterSort(boolean las)
           
 void setLimitOnly(boolean limitOnly)
           
 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 setSecondarySortOrder(boolean[] secondarySortOrder)
           
 void setSkewedJoin(boolean skJoin)
           
 void setSkewedJoinPartitionFile(String file)
           
 void setSortOrder(boolean[] sortOrder)
           
 void setSplitter(boolean spl)
           
 void setUseSecondaryKey(boolean useSecondaryKey)
           
 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, getProjectionMap, hashCode, regenerateProjectionMap, rewire, toString, unsetProjectionMap
 
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()

isSkewedJoin

public boolean isSkewedJoin()

setSkewedJoinPartitionFile

public void setSkewedJoinPartitionFile(String file)

getSkewedJoinPartitionFile

public String getSkewedJoinPartitionFile()

setSkewedJoin

public void setSkewedJoin(boolean skJoin)

getSkewedJoin

public boolean getSkewedJoin()

setGlobalSort

public void setGlobalSort(boolean globalSort)

isLimitAfterSort

public boolean isLimitAfterSort()

setLimitAfterSort

public void setLimitAfterSort(boolean las)

isLimitOnly

public boolean isLimitOnly()

setLimitOnly

public void setLimitOnly(boolean limitOnly)

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)

setSecondarySortOrder

public void setSecondarySortOrder(boolean[] secondarySortOrder)

getSortOrder

public boolean[] getSortOrder()

getSecondarySortOrder

public boolean[] getSecondarySortOrder()

isEndOfAllInputSetInMap

public boolean isEndOfAllInputSetInMap()
Returns:
whether end of all input is set in the map plan

setEndOfAllInputInMap

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

isEndOfAllInputSetInReduce

public boolean isEndOfAllInputSetInReduce()
Returns:
whether end of all input is set in the reduce plan

setEndOfAllInputInReduce

public void setEndOfAllInputInReduce(boolean endOfAllInputInReduce)
Parameters:
endOfAllInputInReduce - 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)

getRequestedParallelism

public int getRequestedParallelism()

setSplitter

public void setSplitter(boolean spl)

isSplitter

public boolean isSplitter()

getUseSecondaryKey

public boolean getUseSecondaryKey()

setUseSecondaryKey

public void setUseSecondaryKey(boolean useSecondaryKey)


Copyright © ${year} The Apache Software Foundation