org.apache.hadoop.zebra.types
Class TypesUtils.TupleReader

java.lang.Object
  extended by 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.
 
Method Summary
 void get(DataInputStream in, Tuple row)
          Read a tuple from the stream, and perform projection.
 Projection getprojction()
           
 Schema getSchema()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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
Method Detail

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 stream
row - The input tuple that should conform to the projection schema.
Throws:
IOException
ParseException


Copyright © ${year} The Apache Software Foundation