org.apache.pig.newplan.logical.relational
Class LOLoad

java.lang.Object
  extended by org.apache.pig.newplan.Operator
      extended by org.apache.pig.newplan.logical.relational.LogicalRelationalOperator
          extended by org.apache.pig.newplan.logical.relational.LOLoad

public class LOLoad
extends LogicalRelationalOperator


Field Summary
 
Fields inherited from class org.apache.pig.newplan.logical.relational.LogicalRelationalOperator
alias, lineNum, mCustomPartitioner, requestedParallelism, schema
 
Fields inherited from class org.apache.pig.newplan.Operator
annotations, hashPrime, name, plan
 
Constructor Summary
LOLoad(FileSpec loader, LogicalSchema schema, LogicalPlan plan, org.apache.hadoop.conf.Configuration conf)
           
 
Method Summary
 void accept(PlanVisitor v)
          Accept a visitor at this node in the graph.
 org.apache.hadoop.conf.Configuration getConfiguration()
           
 LogicalSchema getDeterminedSchema()
           
 FileSpec getFileSpec()
           
 LoadFunc getLoadFunc()
           
 LogicalSchema getSchema()
          Get the schema for this load.
 String getSignature()
           
 boolean isCastInserted()
           
 boolean isEqual(Operator other)
          This is like a shallow equals comparison.
 void resetUid()
          Erase all cached uid, regenerate uid when we regenerating schema.
 void setAlias(String alias)
           
 void setCastInserted(boolean flag)
           
 void setRequiredFields(List<Integer> requiredFields)
           
 void setScriptSchema(LogicalSchema schema)
           
 void setSignature(String signature)
          This method is called by Pig logical planner to setup UDFContext signature.
 String toString()
           
 
Methods inherited from class org.apache.pig.newplan.logical.relational.LogicalRelationalOperator
checkEquality, getAlias, getCustomPartitioner, getLineNumber, getRequestedParallelisam, neverUseForRealSetSchema, resetSchema, setCustomPartitioner, setRequestedParallelism, setSchema
 
Methods inherited from class org.apache.pig.newplan.Operator
annotate, getAnnotation, getName, getPlan, removeAnnotation, setPlan
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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

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()

setAlias

public void setAlias(String alias)
Overrides:
setAlias in class LogicalRelationalOperator

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



Copyright © ${year} The Apache Software Foundation