Class DrillVersionInfo

java.lang.Object
org.apache.drill.common.util.DrillVersionInfo

public class DrillVersionInfo extends Object
Give access to Drill version as captured during the build Caution don't rely on major, minor and patch versions only to compare two Drill versions. Instead you should use the whole string, and apply the same semver algorithm as Maven (see org.apache.maven.artifact.versioning.ComparableVersion).
  • Field Details

    • VERSION

      public static final Version VERSION
      The version extracted from Maven POM file at build time.
  • Constructor Details

    • DrillVersionInfo

      public DrillVersionInfo()
  • Method Details

    • getVersion

      public static String getVersion()
      Get the Drill version from pom
      Returns:
      the version number as x.y.z
    • getMajorVersion

      public static int getMajorVersion()
      Get the Drill major version from pom
      Returns:
      x if assuming the version number is x.y.z
    • getMinorVersion

      public static int getMinorVersion()
      Get the Drill minor version from pom
      Returns:
      y if assuming the version number is x.y.z
    • getPatchVersion

      public static int getPatchVersion()
      Get the Drill patch version from pom
      Returns:
      z if assuming the version number is x.y.z(-suffix)
    • getBuildNumber

      public static int getBuildNumber()
      Get the Drill build number from pom
      Returns:
      z if assuming the version number is x.y.z(.b)(-suffix)
    • getQualifier

      public static String getQualifier()
      Get the Drill version qualifier from pom
      Returns:
      suffix if assuming the version number is x.y.z(-suffix), or an empty string