org.apache.hadoop.typedbytes
Class TypedBytesRecordOutput

java.lang.Object
  extended by org.apache.hadoop.typedbytes.TypedBytesRecordOutput
All Implemented Interfaces:
org.apache.hadoop.record.RecordOutput

public class TypedBytesRecordOutput
extends Object
implements org.apache.hadoop.record.RecordOutput

Deserialized for records that reads typed bytes.


Constructor Summary
TypedBytesRecordOutput(DataOutput out)
          Creates a new instance of TypedBytesRecordOutput.
TypedBytesRecordOutput(TypedBytesOutput out)
          Creates a new instance of TypedBytesRecordOutput.
 
Method Summary
 void endMap(TreeMap m, String tag)
           
 void endRecord(org.apache.hadoop.record.Record r, String tag)
           
 void endVector(ArrayList v, String tag)
           
static TypedBytesRecordOutput get(DataOutput out)
          Get a thread-local typed bytes record output for the supplied DataOutput.
static TypedBytesRecordOutput get(TypedBytesOutput out)
          Get a thread-local typed bytes record input for the supplied TypedBytesOutput.
 void startMap(TreeMap m, String tag)
           
 void startRecord(org.apache.hadoop.record.Record r, String tag)
           
 void startVector(ArrayList v, String tag)
           
 void writeBool(boolean b, String tag)
           
 void writeBuffer(org.apache.hadoop.record.Buffer buf, String tag)
           
 void writeByte(byte b, String tag)
           
 void writeDouble(double d, String tag)
           
 void writeFloat(float f, String tag)
           
 void writeInt(int i, String tag)
           
 void writeLong(long l, String tag)
           
 void writeString(String s, String tag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypedBytesRecordOutput

public TypedBytesRecordOutput(TypedBytesOutput out)
Creates a new instance of TypedBytesRecordOutput.


TypedBytesRecordOutput

public TypedBytesRecordOutput(DataOutput out)
Creates a new instance of TypedBytesRecordOutput.

Method Detail

get

public static TypedBytesRecordOutput get(TypedBytesOutput out)
Get a thread-local typed bytes record input for the supplied TypedBytesOutput.

Parameters:
out - typed bytes output object
Returns:
typed bytes record output corresponding to the supplied TypedBytesOutput.

get

public static TypedBytesRecordOutput get(DataOutput out)
Get a thread-local typed bytes record output for the supplied DataOutput.

Parameters:
out - data output object
Returns:
typed bytes record output corresponding to the supplied DataOutput.

writeBool

public void writeBool(boolean b,
                      String tag)
               throws IOException
Specified by:
writeBool in interface org.apache.hadoop.record.RecordOutput
Throws:
IOException

writeBuffer

public void writeBuffer(org.apache.hadoop.record.Buffer buf,
                        String tag)
                 throws IOException
Specified by:
writeBuffer in interface org.apache.hadoop.record.RecordOutput
Throws:
IOException

writeByte

public void writeByte(byte b,
                      String tag)
               throws IOException
Specified by:
writeByte in interface org.apache.hadoop.record.RecordOutput
Throws:
IOException

writeDouble

public void writeDouble(double d,
                        String tag)
                 throws IOException
Specified by:
writeDouble in interface org.apache.hadoop.record.RecordOutput
Throws:
IOException

writeFloat

public void writeFloat(float f,
                       String tag)
                throws IOException
Specified by:
writeFloat in interface org.apache.hadoop.record.RecordOutput
Throws:
IOException

writeInt

public void writeInt(int i,
                     String tag)
              throws IOException
Specified by:
writeInt in interface org.apache.hadoop.record.RecordOutput
Throws:
IOException

writeLong

public void writeLong(long l,
                      String tag)
               throws IOException
Specified by:
writeLong in interface org.apache.hadoop.record.RecordOutput
Throws:
IOException

writeString

public void writeString(String s,
                        String tag)
                 throws IOException
Specified by:
writeString in interface org.apache.hadoop.record.RecordOutput
Throws:
IOException

startRecord

public void startRecord(org.apache.hadoop.record.Record r,
                        String tag)
                 throws IOException
Specified by:
startRecord in interface org.apache.hadoop.record.RecordOutput
Throws:
IOException

startVector

public void startVector(ArrayList v,
                        String tag)
                 throws IOException
Specified by:
startVector in interface org.apache.hadoop.record.RecordOutput
Throws:
IOException

startMap

public void startMap(TreeMap m,
                     String tag)
              throws IOException
Specified by:
startMap in interface org.apache.hadoop.record.RecordOutput
Throws:
IOException

endRecord

public void endRecord(org.apache.hadoop.record.Record r,
                      String tag)
               throws IOException
Specified by:
endRecord in interface org.apache.hadoop.record.RecordOutput
Throws:
IOException

endVector

public void endVector(ArrayList v,
                      String tag)
               throws IOException
Specified by:
endVector in interface org.apache.hadoop.record.RecordOutput
Throws:
IOException

endMap

public void endMap(TreeMap m,
                   String tag)
            throws IOException
Specified by:
endMap in interface org.apache.hadoop.record.RecordOutput
Throws:
IOException


Copyright © 2009 The Apache Software Foundation