public static class TypesUtils.TupleReader
extends java.lang.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(java.io.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 java.io.IOException, org.apache.hadoop.zebra.parser.ParseException
physical
- The physical schema of on-disk data.projection
- The logical schema of tuples user expect.java.io.IOException
org.apache.hadoop.zebra.parser.ParseException
public Schema getSchema()
public Projection getprojction()
public void get(java.io.DataInputStream in, Tuple row) throws java.io.IOException, org.apache.hadoop.zebra.parser.ParseException
in
- The input streamrow
- The input tuple that should conform to the projection schema.java.io.IOException
org.apache.hadoop.zebra.parser.ParseException
Copyright © 2007-2012 The Apache Software Foundation