public static class TypesUtils.TupleReader extends Object
| Constructor and Description |
|---|
TypesUtils.TupleReader(Schema physical,
Projection projection)
Constructor - create a TupleReader than can parse the serialized Tuple
with the specified physical schema, and produce the Tuples based on the
projection.
|
| Modifier and Type | Method and Description |
|---|---|
void |
get(DataInputStream in,
Tuple row)
Read a tuple from the stream, and perform projection.
|
Projection |
getprojction() |
Schema |
getSchema() |
public TypesUtils.TupleReader(Schema physical, Projection projection) throws IOException, ParseException
physical - The physical schema of on-disk data.projection - The logical schema of tuples user expect.IOExceptionParseExceptionpublic Schema getSchema()
public Projection getprojction()
public void get(DataInputStream in, Tuple row) throws IOException, ParseException
in - The input streamrow - The input tuple that should conform to the projection schema.IOExceptionParseExceptionCopyright © 2007-2012 The Apache Software Foundation