|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<SchemaTupleClassGenerator.GenContext>
org.apache.pig.data.SchemaTupleClassGenerator.GenContext
public static enum SchemaTupleClassGenerator.GenContext
The GenContext mechanism provides a level of control in where SchemaTupleFactories are used. By attaching a GenContext enum type to the registration of a Schema, the code can express the intent of where a SchemaTupleFactory is intended to be used. In this way, if a load func and a join both involve Tuples of the same Schema, it's possible to use SchemaTupleFactories in one but not in the other.
Nested Class Summary | |
---|---|
static interface |
SchemaTupleClassGenerator.GenContext.GenerateForceLoad
|
static interface |
SchemaTupleClassGenerator.GenContext.GenerateForeach
|
static interface |
SchemaTupleClassGenerator.GenContext.GenerateFrJoin
|
static interface |
SchemaTupleClassGenerator.GenContext.GenerateMergeJoin
|
static interface |
SchemaTupleClassGenerator.GenContext.GenerateUdf
These annotations are used to mark a given SchemaTuple with the context in which is was intended to be generated. |
Enum Constant Summary | |
---|---|
FORCE_LOAD
All registered Schemas will also be registered in one additional context. |
|
FOREACH
This context is for POForEach. |
|
FR_JOIN
This context controls whether or not SchemaTuples will be used in FR joins. |
|
MERGE_JOIN
This context controls whether or not SchemaTuples will be used in merge joins. |
|
UDF
This context is used in UDF code. |
Method Summary | |
---|---|
String |
getAnnotationCanonicalName()
|
String |
key()
|
boolean |
shouldGenerate(Class clazz)
Checks the generated class to see if the annotation associated with this enum is present. |
boolean |
shouldGenerate(org.apache.hadoop.conf.Configuration conf)
Given a job configuration file, this checks to see if the default value has been overriden. |
static SchemaTupleClassGenerator.GenContext |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static SchemaTupleClassGenerator.GenContext[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final SchemaTupleClassGenerator.GenContext UDF
public static final SchemaTupleClassGenerator.GenContext FOREACH
public static final SchemaTupleClassGenerator.GenContext FR_JOIN
public static final SchemaTupleClassGenerator.GenContext MERGE_JOIN
public static final SchemaTupleClassGenerator.GenContext FORCE_LOAD
Method Detail |
---|
public static SchemaTupleClassGenerator.GenContext[] values()
for (SchemaTupleClassGenerator.GenContext c : SchemaTupleClassGenerator.GenContext.values()) System.out.println(c);
public static SchemaTupleClassGenerator.GenContext valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic String key()
public String getAnnotationCanonicalName()
public boolean shouldGenerate(Class clazz)
clazz
-
public boolean shouldGenerate(org.apache.hadoop.conf.Configuration conf)
conf
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |