Class VersionInfo

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

@Public @Stable public class VersionInfo extends Object
This class returns build information about Hadoop components.
  • Constructor Details

    • VersionInfo

      protected VersionInfo(String component)
  • Method Details

    • _getVersion

      protected String _getVersion()
    • _getRevision

      protected String _getRevision()
    • _getBranch

      protected String _getBranch()
    • _getDate

      protected String _getDate()
    • _getUser

      protected String _getUser()
    • _getUrl

      protected String _getUrl()
    • _getSrcChecksum

      protected String _getSrcChecksum()
    • _getBuildVersion

      protected String _getBuildVersion()
    • _getProtocVersion

      protected String _getProtocVersion()
    • _getCompilePlatform

      protected String _getCompilePlatform()
    • getVersion

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

      public static String getRevision()
      Get the Git commit hash of the repository when compiled.
      Returns:
      the commit hash, eg. "18f64065d5db6208daf50b02c1b5ed4ee3ce547a"
    • getBranch

      public static String getBranch()
      Get the branch on which this originated.
      Returns:
      The branch name, e.g. "trunk" or "branches/branch-0.20"
    • getDate

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

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

      public static String getUrl()
      Get the URL for the Hadoop repository.
      Returns:
      the URL of the Hadoop repository
    • getSrcChecksum

      public static String getSrcChecksum()
      Get the checksum of the source files from which Hadoop was built.
      Returns:
      the checksum of the source files
    • getBuildVersion

      public static String getBuildVersion()
      Returns the buildVersion which includes version, revision, user and date.
      Returns:
      the buildVersion
    • getProtocVersion

      public static String getProtocVersion()
      Returns the protoc version used for the build.
      Returns:
      the protoc version
    • getCompilePlatform

      public static String getCompilePlatform()
      Returns the OS platform used for the build.
      Returns:
      the OS platform
    • main

      public static void main(String[] args)