|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.zebra.types.TypesUtils
public class TypesUtils
Utility methods manipulating Table types (specifically, Tuple objects).
Nested Class Summary | |
---|---|
static class |
TypesUtils.TupleReader
Reading a tuple from disk with projection. |
static class |
TypesUtils.TupleWriter
Writing a tuple to disk. |
Constructor Summary | |
---|---|
TypesUtils()
|
Method Summary | |
---|---|
static void |
checkCompatible(Tuple tuple,
Schema schema)
Check whether the input row object is compatible with the expected schema |
static void |
checkNumberColumnCompatible(Tuple tuple,
Schema schema)
Check whether the input row object is compatible with the expected schema on number of Columns; |
static DataBag |
createBag()
Create a PIG Bag object. |
static DataBag |
createBag(Schema schema)
|
static Tuple |
createTuple(int size)
create a tuple based on number of columns |
static Tuple |
createTuple(Schema schema)
Create a tuple based on a schema |
static void |
formatTuple(Tuple tuple,
int ncols)
Checking and formatting an input tuple to conform to the input schema. The current implementation always create a new tuple because PIG expects Slice.next(tuple) always returning a brand new tuple. |
static void |
resetTuple(Tuple tuple)
Reset the Tuple so that all fields are NULL field. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TypesUtils()
Method Detail |
---|
public static Tuple createTuple(Schema schema) throws IOException
schema
- The schema that the tuple will conform to.
IOException
public static Tuple createTuple(int size) throws IOException
IOException
public static DataBag createBag()
public static DataBag createBag(Schema schema)
public static void resetTuple(Tuple tuple)
tuple
- Input tuple.public static void checkCompatible(Tuple tuple, Schema schema) throws IOException
tuple
- Input Tuple objectschema
- Table schema
IOException
public static void checkNumberColumnCompatible(Tuple tuple, Schema schema) throws IOException
tuple
- Input Tuple objectschema
- Table schema
IOException
public static void formatTuple(Tuple tuple, int ncols) throws IOException
tuple
-
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |