org.apache.pig.impl.eval
Class CompositeEvalSpec

java.lang.Object
  extended by org.apache.pig.impl.eval.EvalSpec
      extended by org.apache.pig.impl.eval.CompositeEvalSpec
All Implemented Interfaces:
Serializable

public class CompositeEvalSpec
extends EvalSpec

Follows the composite design pattern

Author:
utkarsh
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pig.impl.eval.EvalSpec
EvalSpec.UserComparator
 
Field Summary
 
Fields inherited from class org.apache.pig.impl.eval.EvalSpec
inner, properties
 
Constructor Summary
CompositeEvalSpec(EvalSpec spec)
           
 
Method Summary
 EvalSpec addSpec(EvalSpec spec)
          set the succesor of this spec
 List<String> getFuncs()
          Get the functions required by this spec
 List<EvalSpec> getSpecs()
           
 void instantiateFunc(FunctionInstantiator fInstantiaor)
           
 boolean isAsynchronous()
          Some specs may be asynchronous, i.e., they return before completing the processing fully.
protected  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.
protected  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
 String toString()
           
 void visit(EvalSpecVisitor v)
           
 
Methods inherited from class org.apache.pig.impl.eval.EvalSpec
copy, finish, getCombiner, getComparator, getComparatorName, getLineage, getOutputSchemaForPipe, getProperties, isFlattened, isInner, setComparatorName, setFlatten, setInner, setLineageTracer, setSchema, setupPipe, simpleEval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompositeEvalSpec

public CompositeEvalSpec(EvalSpec spec)
Method Detail

setupDefaultPipe

protected DataCollector setupDefaultPipe(Properties properties,
                                         DataCollector endOfPipe)
Description copied from class: EvalSpec
set up a default data processing pipe for processing by this spec This pipe does not include unflattening/flattening at the end

Specified by:
setupDefaultPipe in class EvalSpec
Parameters:
properties - properties for the pipe
endOfPipe - The collector where output is desired
Returns:
The collector where input tuples should be put

getFuncs

public List<String> getFuncs()
Description copied from class: EvalSpec
Get the functions required by this spec

Specified by:
getFuncs in class EvalSpec
Returns:

addSpec

public EvalSpec addSpec(EvalSpec spec)
Description copied from class: EvalSpec
set the succesor of this spec

Overrides:
addSpec in class EvalSpec
Parameters:
spec - the new succesor
Returns:

toString

public String toString()
Overrides:
toString in class Object

isAsynchronous

public boolean isAsynchronous()
Description copied from class: EvalSpec
Some specs may be asynchronous, i.e., they return before completing the processing fully. The default value is false, may be overridden to return true

Overrides:
isAsynchronous in class EvalSpec

mapInputSchema

protected Schema mapInputSchema(Schema schema)
Description copied from class: EvalSpec
Given an input schema, determine the output schema of this spec as it operates on input tuples with the input schema.

Specified by:
mapInputSchema in class EvalSpec
Returns:

instantiateFunc

public void instantiateFunc(FunctionInstantiator fInstantiaor)
                     throws IOException
Overrides:
instantiateFunc in class EvalSpec
Throws:
IOException

getSpecs

public List<EvalSpec> getSpecs()

visit

public void visit(EvalSpecVisitor v)
Specified by:
visit in class EvalSpec


Copyright © ${year} The Apache Software Foundation