|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.impl.eval.EvalSpec
public abstract class EvalSpec
Nested Class Summary | |
---|---|
class |
EvalSpec.UserComparator
|
Field Summary | |
---|---|
protected boolean |
inner
|
protected Properties |
properties
|
Constructor Summary | |
---|---|
EvalSpec()
|
Method Summary | |
---|---|
EvalSpec |
addSpec(EvalSpec spec)
set the succesor of this spec |
EvalSpec |
copy(PigContext pigContext)
|
void |
finish()
A placeholder for any cleanup action that the spec needs to perform |
EvalSpec |
getCombiner()
|
Comparator<Tuple> |
getComparator()
Compare 2 tuples according to this spec. |
String |
getComparatorName()
|
abstract List<String> |
getFuncs()
Get the functions required by this spec |
LineageTracer |
getLineage()
|
Schema |
getOutputSchemaForPipe(Schema input)
|
Properties |
getProperties()
Get properties specific to a given EvalSpec . |
void |
instantiateFunc(FunctionInstantiator instantiaor)
|
boolean |
isAsynchronous()
Some specs may be asynchronous, i.e., they return before completing the processing fully. |
boolean |
isFlattened()
|
boolean |
isInner()
|
protected abstract Schema |
mapInputSchema(Schema schema)
Given an input schema, determine the output schema of this spec as it operates on input tuples with the input schema. |
void |
setComparatorName(String name)
|
void |
setFlatten(boolean isFlattened)
|
void |
setInner(boolean inner)
|
void |
setLineageTracer(LineageTracer lineage)
|
void |
setSchema(Schema schema)
|
protected abstract DataCollector |
setupDefaultPipe(Properties properties,
DataCollector endOfPipe)
set up a default data processing pipe for processing by this spec This pipe does not include unflattening/flattening at the end |
DataCollector |
setupPipe(Properties properties,
DataCollector endOfPipe)
set up a data processing pipe with flattening/unflattening at the end based on the isFlattened field |
Datum |
simpleEval(Datum input)
If the spec is such that it produces exactly one datum per input datum, we can use simple eval as a shortcut to the whole process of setting the pipe etc. |
abstract void |
visit(EvalSpecVisitor v)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean inner
protected Properties properties
Constructor Detail |
---|
public EvalSpec()
Method Detail |
---|
public void setLineageTracer(LineageTracer lineage)
public LineageTracer getLineage()
public void instantiateFunc(FunctionInstantiator instantiaor) throws IOException
IOException
protected abstract DataCollector setupDefaultPipe(Properties properties, DataCollector endOfPipe)
properties
- properties for the pipeendOfPipe
- The collector where output is desired
public DataCollector setupPipe(Properties properties, DataCollector endOfPipe)
properties
- properties for the EvalSpec
endOfPipe
- where the output is desired
public EvalSpec addSpec(EvalSpec spec)
spec
- the new succesor
public abstract List<String> getFuncs()
public Schema getOutputSchemaForPipe(Schema input)
protected abstract Schema mapInputSchema(Schema schema)
input
-
public void finish()
public boolean isAsynchronous()
public void setComparatorName(String name)
public String getComparatorName()
public Comparator<Tuple> getComparator()
public void setFlatten(boolean isFlattened)
public boolean isFlattened()
public Datum simpleEval(Datum input)
input
-
public EvalSpec getCombiner()
public EvalSpec copy(PigContext pigContext)
public void setSchema(Schema schema)
public boolean isInner()
public void setInner(boolean inner)
public Properties getProperties()
EvalSpec
.
EvalSpec
public abstract void visit(EvalSpecVisitor v)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |