|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.newplan.Operator
org.apache.pig.newplan.logical.relational.LogicalRelationalOperator
public abstract class LogicalRelationalOperator
Logical representation of relational operators. Relational operators have a schema.
Field Summary | |
---|---|
protected String |
alias
|
protected int |
lineNum
|
protected String |
mCustomPartitioner
Name of the customPartitioner if one is used, this is set to null otherwise. |
protected HashSet<Integer> |
mPinnedOptions
A HashSet to indicate whether an option (such a Join Type) was pinned by the user or can be chosen at runtime by the optimizer. |
protected int |
requestedParallelism
|
protected LogicalSchema |
schema
|
Fields inherited from class org.apache.pig.newplan.Operator |
---|
annotations, hashPrime, location, name, plan |
Constructor Summary | |
---|---|
LogicalRelationalOperator(String name,
OperatorPlan plan)
|
|
LogicalRelationalOperator(String name,
OperatorPlan plan,
int rp)
|
Method Summary | |
---|---|
protected boolean |
checkEquality(LogicalRelationalOperator other)
Do some basic equality checks on two relational operators. |
static void |
fixDuplicateUids(List<LogicalSchema.LogicalFieldSchema> fss)
In the case of an operation which manipualtes columns (such as a foreach or a join) it is possible for multiple columns to have been derived from the same column and thus have duplicate UID's. |
String |
getAlias()
Get the alias of this operator. |
String |
getCustomPartitioner()
|
int |
getLineNumber()
Get the line number in the submitted Pig Latin script where this operator occurred. |
int |
getRequestedParallelism()
Get the requestedParallelism for this operator. |
abstract LogicalSchema |
getSchema()
Get the schema for the output of this relational operator. |
boolean |
isPinnedOption(Integer opt)
|
void |
neverUseForRealSetSchema(LogicalSchema schema)
Only to be used by unit tests. |
void |
pinOption(Integer opt)
|
void |
resetSchema()
Reset the schema to null so that the next time getSchema is called the schema will be regenerated from scratch. |
void |
resetUid()
Erase all cached uid, regenerate uid when we regenerating schema. |
void |
setAlias(String alias)
|
void |
setCustomPartitioner(String customPartitioner)
|
void |
setRequestedParallelism(int parallel)
|
void |
setSchema(LogicalSchema schema)
|
String |
toString()
|
Methods inherited from class org.apache.pig.newplan.Operator |
---|
accept, annotate, getAnnotation, getLocation, getName, getPlan, isEqual, removeAnnotation, setLocation, setPlan |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected LogicalSchema schema
protected int requestedParallelism
protected String alias
protected int lineNum
protected String mCustomPartitioner
protected HashSet<Integer> mPinnedOptions
Constructor Detail |
---|
public LogicalRelationalOperator(String name, OperatorPlan plan)
name
- of this operatorplan
- this operator is inpublic LogicalRelationalOperator(String name, OperatorPlan plan, int rp)
name
- of this operatorplan
- this operator is inrp
- requested parallelismMethod Detail |
---|
public abstract LogicalSchema getSchema() throws FrontendException
FrontendException
public void setSchema(LogicalSchema schema)
public void resetSchema()
public void resetUid()
public int getRequestedParallelism()
public String getAlias()
public void setAlias(String alias)
public void setRequestedParallelism(int parallel)
public int getLineNumber()
public void neverUseForRealSetSchema(LogicalSchema schema)
schema
- to setprotected boolean checkEquality(LogicalRelationalOperator other) throws FrontendException
other
- LogicalRelationalOperator to compare predecessors against
FrontendException
public String toString()
toString
in class Object
public String getCustomPartitioner()
public void setCustomPartitioner(String customPartitioner)
public void pinOption(Integer opt)
public boolean isPinnedOption(Integer opt)
public static void fixDuplicateUids(List<LogicalSchema.LogicalFieldSchema> fss)
fss
- a list of LogicalFieldSchemas to check the uids of
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |