org.apache.hadoop.zebra.types
Class TypesUtils.TupleReader
java.lang.Object
org.apache.hadoop.zebra.types.TypesUtils.TupleReader
- Enclosing class:
- TypesUtils
public static class TypesUtils.TupleReader
- extends Object
Reading a tuple from disk with projection.
Constructor Summary |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TypesUtils.TupleReader
public TypesUtils.TupleReader(Schema physical,
Projection projection)
throws IOException,
ParseException
- Constructor - create a TupleReader than can parse the serialized Tuple
with the specified physical schema, and produce the Tuples based on the
projection.
- Parameters:
physical
- The physical schema of on-disk data.projection
- The logical schema of tuples user expect.
- Throws:
IOException
ParseException
getSchema
public Schema getSchema()
getprojction
public Projection getprojction()
get
public void get(DataInputStream in,
Tuple row)
throws IOException,
ParseException
- Read a tuple from the stream, and perform projection.
- Parameters:
in
- The input streamrow
- The input tuple that should conform to the projection schema.
- Throws:
IOException
ParseException
Copyright © ${year} The Apache Software Foundation