Package org.apache.hadoop.hbase.util
Class VersionInfo
java.lang.Object
org.apache.hadoop.hbase.util.VersionInfo
This class finds the Version information for HBase.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intcompareVersion(String v1, String v2) static StringgetDate()The date that hbase was compiled.static intgetMajorVersion(String version) static StringGet the subversion revision number for the root directorystatic StringGet the checksum of the source files from which Hadoop was compiled.static StringgetUrl()Get the subversion URL for the root hbase directory.static StringgetUser()The user that compiled hbase.static StringGet the hbase version.private static String[]getVersionComponents(String version) Returns the version components as String objects Examples: "1.2.3" returns ["1", "2", "3"], "4.5.6-SNAPSHOT" returns ["4", "5", "6", "-1"] "4.5.6-beta" returns ["4", "5", "6", "-2"], "4.5.6-alpha" returns ["4", "5", "6", "-3"] "4.5.6-UNKNOW" returns ["4", "5", "6", "-4"]static voidstatic void(package private) static String[]static voidwriteTo(PrintStream out) static voidwriteTo(PrintWriter out)
-
Field Details
-
LOG
-
VERY_LARGE_NUMBER
- See Also:
-
-
Constructor Details
-
VersionInfo
public VersionInfo()
-
-
Method Details
-
getVersion
Get the hbase version.- Returns:
- the hbase version string, eg. "0.6.3-dev"
-
getRevision
Get the subversion revision number for the root directory- Returns:
- the revision number, eg. "451451"
-
getDate
The date that hbase was compiled.- Returns:
- the compilation date in unix date format
-
getUser
The user that compiled hbase.- Returns:
- the username of the user
-
getUrl
Get the subversion URL for the root hbase directory.- Returns:
- the url
-
versionReport
-
getSrcChecksum
Get the checksum of the source files from which Hadoop was compiled.- Returns:
- a string that uniquely identifies the source
-
writeTo
-
writeTo
-
logVersion
-
compareVersion
-
getVersionComponents
Returns the version components as String objects Examples: "1.2.3" returns ["1", "2", "3"], "4.5.6-SNAPSHOT" returns ["4", "5", "6", "-1"] "4.5.6-beta" returns ["4", "5", "6", "-2"], "4.5.6-alpha" returns ["4", "5", "6", "-3"] "4.5.6-UNKNOW" returns ["4", "5", "6", "-4"]- Returns:
- the components of the version string
-
getMajorVersion
-
main
-