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, getAlias, getCustomPartitioner, getLineNumber, getRequestedParallelisam, isPinnedOption, neverUseForRealSetSchema, pinOption, resetSchema, setCustomPartitioner, setRequestedParallelism, setSchema |
LOLoad
public LOLoad(FileSpec loader,
LogicalSchema schema,
LogicalPlan plan,
org.apache.hadoop.conf.Configuration conf)
- 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.
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
setAlias
public void setAlias(String alias)
- Overrides:
setAlias
in class LogicalRelationalOperator
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
setCastInserted
public void setCastInserted(boolean flag)
isCastInserted
public boolean isCastInserted()
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()
setSignature
public void setSignature(String signature)
- This method is called by Pig logical planner to setup UDFContext signature.
So that loadFunc can use signature to store its own configurations in UDFContext.
This is not intend to be called by users
getScriptSchema
public LogicalSchema getScriptSchema()
Copyright © 2012 The Apache Software Foundation