|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.impl.logicalLayer.schema.SchemaUtil
public class SchemaUtil
A utility class for simplify the schema creation, especially for bag and tuple schema. Currently, it only support simple schema creation, nested tuple and bag is not supported
Constructor Summary | |
---|---|
SchemaUtil()
|
Method Summary | |
---|---|
static Schema |
newBagSchema(Byte[] dataTypes)
Create a new tuple schema according one array: the type of fields, the tuple name is t, and the bag name is b. |
static Schema |
newBagSchema(List<Byte> dataTypes)
Create a new tuple schema according one list: types of fields, the default names of fields are f0,f1,f2..., and the tuple is t, the bag name is b. |
static Schema |
newBagSchema(List<String> names,
List<Byte> dataTypes)
Create a bag schema according two list: name of fields, type of fields, and the default bag name is b, the default tuple name is t. |
static Schema |
newBagSchema(String[] names,
Byte[] dataTypes)
Create a new tuple schema according two arrays: names of field,types of fields. |
static Schema |
newBagSchema(String bagName,
String tupleName,
List<String> fieldNames,
List<Byte> dataTypes)
Create a bag schema according the bag name,tuple name and two list: name of fields, type of fields |
static Schema |
newBagSchema(String bagName,
String tupleName,
String[] fieldNames,
Byte[] dataTypes)
|
static Schema |
newTupleSchema(Byte[] dataTypes)
Create a new tuple schema according one array: types of fields, the default names of fields are f0,f1,f2..., and the tuple name is t. |
static Schema |
newTupleSchema(List<Byte> dataTypes)
Create a new tuple schema according one list: types of fields, the default names of fields are f0,f1,f2..., and the tuple name is t. |
static Schema |
newTupleSchema(List<String> fieldNames,
List<Byte> dataTypes)
Create a new tuple schema according the two list: names of fields, types of fields, the default tuple name is t. |
static Schema |
newTupleSchema(String[] names,
Byte[] dataTypes)
Create a new tuple schema according the two arrays: names of fields, types of fields, the default tuple name is t. |
static Schema |
newTupleSchema(String tupleName,
List<String> fieldNames,
List<Byte> dataTypes)
Create a new tuple schema according the tuple name and two list: names of fields, types of fields |
static Schema |
newTupleSchema(String tupleName,
String[] fieldNames,
Byte[] dataTypes)
Create a new tuple schema according the tuple name and two arrays: names of fields, types of fields |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SchemaUtil()
Method Detail |
---|
public static Schema newTupleSchema(String tupleName, List<String> fieldNames, List<Byte> dataTypes) throws FrontendException
tupleName
- fieldNames
- dataTypes
-
FrontendException
public static Schema newTupleSchema(String tupleName, String[] fieldNames, Byte[] dataTypes) throws FrontendException
tupleName
- fieldNames
- dataTypes
-
FrontendException
public static Schema newTupleSchema(List<String> fieldNames, List<Byte> dataTypes) throws FrontendException
fieldNames
- dataTypes
-
FrontendException
public static Schema newTupleSchema(List<Byte> dataTypes) throws FrontendException
dataTypes
-
FrontendException
public static Schema newTupleSchema(String[] names, Byte[] dataTypes) throws FrontendException
names
- dataTypes
-
FrontendException
public static Schema newTupleSchema(Byte[] dataTypes) throws FrontendException
dataTypes
-
FrontendException
public static Schema newBagSchema(String bagName, String tupleName, List<String> fieldNames, List<Byte> dataTypes) throws FrontendException
bagName
- tupleName
- fieldNames
- dataTypes
-
FrontendException
public static Schema newBagSchema(String bagName, String tupleName, String[] fieldNames, Byte[] dataTypes) throws FrontendException
FrontendException
public static Schema newBagSchema(List<String> names, List<Byte> dataTypes) throws FrontendException
names
- dataTypes
-
FrontendException
public static Schema newBagSchema(List<Byte> dataTypes) throws FrontendException
dataTypes
-
FrontendException
public static Schema newBagSchema(String[] names, Byte[] dataTypes) throws FrontendException
names
- dataTypes
-
FrontendException
public static Schema newBagSchema(Byte[] dataTypes) throws FrontendException
dataTypes
-
FrontendException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |