org.apache.pig.newplan.logical.relational
Class LOLoad
java.lang.Object
org.apache.pig.newplan.Operator
org.apache.pig.newplan.logical.relational.LogicalRelationalOperator
org.apache.pig.newplan.logical.relational.LOLoad
public class LOLoad
- extends LogicalRelationalOperator
Methods inherited from class org.apache.pig.newplan.logical.relational.LogicalRelationalOperator |
checkEquality, fixDuplicateUids, getAlias, getCustomPartitioner, getLineNumber, getRequestedParallelism, isPinnedOption, neverUseForRealSetSchema, pinOption, resetSchema, setAlias, setCustomPartitioner, setRequestedParallelism, setSchema |
LOLoad
public LOLoad(LogicalSchema schema,
LogicalPlan plan)
- used for pattern matching
- Parameters:
schema
- schema user specified in script, or null if not
specified.plan
- logical plan this load is part of.
LOLoad
public LOLoad(FileSpec loader,
LogicalSchema schema,
LogicalPlan plan,
org.apache.hadoop.conf.Configuration conf,
LoadFunc loadFunc,
String signature)
- Used from the LogicalPlanBuilder
- Parameters:
loader
- FuncSpec for load function to use for this load.schema
- schema user specified in script, or null if not specified.plan
- logical plan this load is part of.conf
- loadFunc
- the LoadFunc that was instantiated from loadersignature
- the signature that will be passed to the LoadFunc
getSchemaFile
public String getSchemaFile()
getLoadFunc
public LoadFunc getLoadFunc()
throws FrontendException
- Throws:
FrontendException
setScriptSchema
public void setScriptSchema(LogicalSchema schema)
setRequiredFields
public void setRequiredFields(List<Integer> requiredFields)
getSchema
public LogicalSchema getSchema()
throws FrontendException
- Get the schema for this load. The schema will be either be what was
given by the user in the script or what the load functions getSchema
call returned. Otherwise null will be returned, indicating that the
schema is unknown.
- Specified by:
getSchema
in class LogicalRelationalOperator
- Returns:
- schema, or null if unknown
- Throws:
FrontendException
getFileSpec
public FileSpec getFileSpec()
accept
public void accept(PlanVisitor v)
throws FrontendException
- Description copied from class:
Operator
- Accept a visitor at this node in the graph.
- Specified by:
accept
in class Operator
- Parameters:
v
- Visitor to accept.
- Throws:
FrontendException
getDeterminedSchema
public LogicalSchema getDeterminedSchema()
isEqual
public boolean isEqual(Operator other)
throws FrontendException
- Description copied from class:
Operator
- This is like a shallow equals comparison.
It returns true if two operators have equivalent properties even if they are
different objects. Here properties mean equivalent plan and equivalent name.
- Specified by:
isEqual
in class Operator
- Returns:
- true if two object have equivalent properties, else false
- Throws:
FrontendException
setCastState
public void setCastState(LOLoad.CastState state)
getCastState
public LOLoad.CastState getCastState()
isCastAdjusted
public boolean isCastAdjusted()
getConfiguration
public org.apache.hadoop.conf.Configuration getConfiguration()
resetUid
public void resetUid()
- Description copied from class:
LogicalRelationalOperator
- Erase all cached uid, regenerate uid when we regenerating schema.
This process currently only used in ImplicitSplitInsert, which will
insert split and invalidate some uids in plan
- Overrides:
resetUid
in class LogicalRelationalOperator
toString
public String toString()
- Overrides:
toString
in class LogicalRelationalOperator
getSignature
public String getSignature()
isTmpLoad
public boolean isTmpLoad()
setTmpLoad
public void setTmpLoad(boolean isTmpLoad)
getScriptSchema
public LogicalSchema getScriptSchema()
getLimit
public long getLimit()
setLimit
public void setLimit(long limit)
Copyright © 2007-2012 The Apache Software Foundation