public class PersistentSerializer extends Object implements org.apache.hadoop.io.serializer.Serializer<PersistentBase>
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(PersistentBase persistent)
Do the serialization of the
PersistentBase object |
public void close() throws IOException
close
in interface org.apache.hadoop.io.serializer.Serializer<PersistentBase>
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<PersistentBase>
IOException
public void serialize(PersistentBase persistent) throws IOException
PersistentBase
objectserialize
in interface org.apache.hadoop.io.serializer.Serializer<PersistentBase>
persistent
- IOException
Copyright © 2010-2017 The Apache Software Foundation. All Rights Reserved.