public class MRCompiler extends PhyPlanVisitor
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FILE_CONCATENATION_THRESHOLD |
static java.lang.String |
OPTIMISTIC_FILE_CONCATENATION |
static java.lang.String |
USER_COMPARATOR_MARKER |
mCurrentWalker, mPlan
Constructor and Description |
---|
MRCompiler(PhysicalPlan plan) |
MRCompiler(PhysicalPlan plan,
PigContext pigContext) |
Modifier and Type | Method and Description |
---|---|
void |
aggregateScalarsFiles() |
MROperPlan |
compile()
The front-end method that the user calls to compile
the plan.
|
void |
connectSoftLink() |
CompilationMessageCollector |
getMessageCollector() |
MROperPlan |
getMRPlan()
Used to get the compiled plan
|
PhysicalPlan |
getPlan()
Used to get the plan that was compiled
|
void |
visitCollectedGroup(POCollectedGroup op) |
void |
visitCounter(POCounter op)
For the counter job, it depends if it is row number or not.
|
void |
visitCross(POCross op) |
void |
visitDistinct(PODistinct op) |
void |
visitFilter(POFilter op) |
void |
visitFRJoin(POFRJoin op)
This is an operator which will have multiple inputs(= to number of join inputs)
But it prunes off all inputs but the fragment input and creates separate MR jobs
for each of the replicated inputs and uses these as the replicated files that
are configured in the POFRJoin operator.
|
void |
visitGlobalRearrange(POGlobalRearrange op) |
void |
visitLimit(POLimit op) |
void |
visitLoad(POLoad op) |
void |
visitLocalRearrange(POLocalRearrange op) |
void |
visitMergeCoGroup(POMergeCogroup poCoGrp)
Leftmost relation is referred as base relation (this is the one fed into mappers.)
First, close all MROpers except for first one (referred as baseMROPer)
Then, create a MROper which will do indexing job (idxMROper)
Connect idxMROper before the mappedMROper in the MRPlan.
|
void |
visitMergeJoin(POMergeJoin joinOp)
Since merge-join works on two inputs there are exactly two MROper predecessors identified as left and right.
|
void |
visitNative(PONative op) |
void |
visitPackage(POPackage op) |
void |
visitPOForEach(POForEach op) |
void |
visitRank(PORank op)
In case of PORank, it is closed any other previous job (containing
POCounter as a leaf) and PORank is added on map phase.
|
void |
visitSkewedJoin(POSkewedJoin op) |
void |
visitSort(POSort op) |
void |
visitSplit(POSplit op)
Compiles a split operator.
|
void |
visitStore(POStore op) |
void |
visitStream(POStream op) |
void |
visitUnion(POUnion op) |
visit, visitAdd, visitAnd, visitBinCond, visitCast, visitComparisonFunc, visitConstant, visitDemux, visitDivide, visitEqualTo, visitGreaterThan, visitGTOrEqual, visitIsNull, visitLessThan, visitLTOrEqual, visitMapLookUp, visitMod, visitMultiply, visitNegative, visitNot, visitNotEqualTo, visitOr, visitPartialAgg, visitPartitionRearrange, visitPoissonSample, visitPOOptimizedForEach, visitPreCombinerLocalRearrange, visitProject, visitRegexp, visitReservoirSample, visitSubtract, visitUserFunc
popWalker, pushWalker, visit
public static final java.lang.String USER_COMPARATOR_MARKER
public static final java.lang.String FILE_CONCATENATION_THRESHOLD
public static final java.lang.String OPTIMISTIC_FILE_CONCATENATION
public MRCompiler(PhysicalPlan plan) throws MRCompilerException
MRCompilerException
public MRCompiler(PhysicalPlan plan, PigContext pigContext) throws MRCompilerException
MRCompilerException
public void aggregateScalarsFiles() throws PlanException, java.io.IOException
PlanException
java.io.IOException
public MROperPlan getMRPlan()
public PhysicalPlan getPlan()
getPlan
in class PlanVisitor<PhysicalOperator,PhysicalPlan>
public CompilationMessageCollector getMessageCollector()
public MROperPlan compile() throws java.io.IOException, PlanException, VisitorException
java.io.IOException
PlanException
VisitorException
public void connectSoftLink() throws PlanException, java.io.IOException
PlanException
java.io.IOException
public void visitSplit(POSplit op) throws VisitorException
visitSplit
in class PhyPlanVisitor
op
- - The split operatorVisitorException
public void visitLoad(POLoad op) throws VisitorException
visitLoad
in class PhyPlanVisitor
VisitorException
public void visitNative(PONative op) throws VisitorException
visitNative
in class PhyPlanVisitor
VisitorException
public void visitStore(POStore op) throws VisitorException
visitStore
in class PhyPlanVisitor
VisitorException
public void visitFilter(POFilter op) throws VisitorException
visitFilter
in class PhyPlanVisitor
VisitorException
public void visitCross(POCross op) throws VisitorException
visitCross
in class PhyPlanVisitor
VisitorException
public void visitStream(POStream op) throws VisitorException
visitStream
in class PhyPlanVisitor
VisitorException
public void visitLimit(POLimit op) throws VisitorException
visitLimit
in class PhyPlanVisitor
VisitorException
public void visitLocalRearrange(POLocalRearrange op) throws VisitorException
visitLocalRearrange
in class PhyPlanVisitor
VisitorException
public void visitCollectedGroup(POCollectedGroup op) throws VisitorException
visitCollectedGroup
in class PhyPlanVisitor
VisitorException
public void visitPOForEach(POForEach op) throws VisitorException
visitPOForEach
in class PhyPlanVisitor
VisitorException
public void visitGlobalRearrange(POGlobalRearrange op) throws VisitorException
visitGlobalRearrange
in class PhyPlanVisitor
VisitorException
public void visitPackage(POPackage op) throws VisitorException
visitPackage
in class PhyPlanVisitor
VisitorException
public void visitUnion(POUnion op) throws VisitorException
visitUnion
in class PhyPlanVisitor
VisitorException
public void visitFRJoin(POFRJoin op) throws VisitorException
visitFRJoin
in class PhyPlanVisitor
VisitorException
public void visitMergeCoGroup(POMergeCogroup poCoGrp) throws VisitorException
visitMergeCoGroup
in class PhyPlanVisitor
VisitorException
public void visitMergeJoin(POMergeJoin joinOp) throws VisitorException
visitMergeJoin
in class PhyPlanVisitor
VisitorException
public void visitDistinct(PODistinct op) throws VisitorException
visitDistinct
in class PhyPlanVisitor
VisitorException
public void visitSkewedJoin(POSkewedJoin op) throws VisitorException
visitSkewedJoin
in class PhyPlanVisitor
VisitorException
public void visitSort(POSort op) throws VisitorException
visitSort
in class PhyPlanVisitor
VisitorException
public void visitCounter(POCounter op) throws VisitorException
visitCounter
in class PhyPlanVisitor
VisitorException
public void visitRank(PORank op) throws VisitorException
visitRank
in class PhyPlanVisitor
VisitorException
Copyright © 2007-2012 The Apache Software Foundation