|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.io.VersionedWritable
public abstract class VersionedWritable
A base class for Writables that provides version checking.
This is useful when a class may evolve, so that instances written by the
old version of the class may still be processed by the new version. To
handle this situation, readFields(DataInput)
implementations should catch VersionMismatchException
.
Constructor Summary | |
---|---|
VersionedWritable()
|
Method Summary | |
---|---|
abstract byte |
getVersion()
Return the version number of the current implementation. |
void |
readFields(DataInput in)
Reads the fields of this object from in . |
void |
write(DataOutput out)
Writes the fields of this object to out . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VersionedWritable()
Method Detail |
---|
public abstract byte getVersion()
public void write(DataOutput out) throws IOException
Writable
out
.
write
in interface Writable
IOException
public void readFields(DataInput in) throws IOException
Writable
in
. For efficiency,
implementations should attempt to re-use storage in the existing object
where possible.
readFields
in interface Writable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |