Class VersionInfo

java.lang.Object
org.apache.hadoop.hbase.util.VersionInfo

@Public public class VersionInfo extends Object
This class finds the Version information for HBase.
  • Field Details

  • Constructor Details

  • Method Details

    • getVersion

      public static String getVersion()
      Get the hbase version.
      Returns:
      the hbase version string, eg. "0.6.3-dev"
    • getRevision

      public static String getRevision()
      Get the subversion revision number for the root directory
      Returns:
      the revision number, eg. "451451"
    • getDate

      public static String getDate()
      The date that hbase was compiled.
      Returns:
      the compilation date in unix date format
    • getUser

      public static String getUser()
      The user that compiled hbase.
      Returns:
      the username of the user
    • getUrl

      public static String getUrl()
      Get the subversion URL for the root hbase directory.
      Returns:
      the url
    • versionReport

      static String[] versionReport()
    • getSrcChecksum

      public static String getSrcChecksum()
      Get the checksum of the source files from which Hadoop was compiled.
      Returns:
      a string that uniquely identifies the source
    • writeTo

      public static void writeTo(PrintWriter out)
    • writeTo

      public static void writeTo(PrintStream out)
    • logVersion

      public static void logVersion()
    • compareVersion

      public static int compareVersion(String v1, String v2)
    • getVersionComponents

      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"]
      Returns:
      the components of the version string
    • getMajorVersion

      public static int getMajorVersion(String version)
    • main

      public static void main(String[] args)