public class PersistentSerializer extends Object implements org.apache.hadoop.io.serializer.Serializer<Persistent>
SpecificDatumWriter
with BinaryEncoder
.Constructor and Description |
---|
PersistentSerializer() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
open(OutputStream out)
Open a connection for the
OutputStream ; should be
called before serialization occurs. |
void |
serialize(Persistent persistent)
Do the serialization of the
Persistent object |
public void close() throws IOException
close
in interface org.apache.hadoop.io.serializer.Serializer<Persistent>
IOException
public void open(OutputStream out) throws IOException
OutputStream
; should be
called before serialization occurs. N.B. the close()
should be called 'finally' after serialization is complete.open
in interface org.apache.hadoop.io.serializer.Serializer<Persistent>
IOException
public void serialize(Persistent persistent) throws IOException
Persistent
objectserialize
in interface org.apache.hadoop.io.serializer.Serializer<Persistent>
IOException
Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.