|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.io.file.tfile.Utils.Version
public static final class Utils.Version
A generic Version class. We suggest applications built on top of TFile use this class to maintain version information in their meta blocks. A version number consists of a major version and a minor version. The suggested usage of major and minor version number is to increment major version number when the new storage format is not backward compatible, and increment the minor version otherwise.
Constructor Summary | |
---|---|
Utils.Version(DataInput in)
Construct the Version object by reading from the input stream. |
|
Utils.Version(short major,
short minor)
Constructor. |
Method Summary | |
---|---|
int |
compareTo(Utils.Version that)
Compare this version with another version. |
boolean |
compatibleWith(Utils.Version other)
Test compatibility. |
boolean |
equals(Object other)
|
int |
getMajor()
Get the major version. |
int |
getMinor()
Get the minor version. |
int |
hashCode()
|
static int |
size()
Get the size of the serialized Version object. |
String |
toString()
Return a string representation of the version. |
void |
write(DataOutput out)
Write the objec to a DataOutput. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Utils.Version(DataInput in) throws IOException
in
- input stream
IOException
public Utils.Version(short major, short minor)
major
- major version.minor
- minor version.Method Detail |
---|
public void write(DataOutput out) throws IOException
out
- The DataOutput object.
IOException
public int getMajor()
public int getMinor()
public static int size()
public String toString()
toString
in class Object
public boolean compatibleWith(Utils.Version other)
other
- The Version object to test compatibility with.
public int compareTo(Utils.Version that)
compareTo
in interface Comparable<Utils.Version>
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |