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
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
compareVersion
(String v1, String v2) static String
getDate()
The date that hbase was compiled.static int
getMajorVersion
(String version) static String
Get the subversion revision number for the root directorystatic String
Get the checksum of the source files from which Hadoop was compiled.static String
getUrl()
Get the subversion URL for the root hbase directory.static String
getUser()
The user that compiled hbase.static String
Get the hbase version.private static String[]
getVersionComponents
(String version) Returns the version components as String objects Examples: "1.4.3" returns ["1", "4", "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 void
static void
(package private) static String[]
static void
writeTo
(PrintStream out) static void
writeTo
(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.4.3" returns ["1", "4", "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
-