Package org.apache.drill.common.util
Class DrillVersionInfo
java.lang.Object
org.apache.drill.common.util.DrillVersionInfo
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
Get the Drill build number from pomstatic int
Get the Drill major version from pomstatic int
Get the Drill minor version from pomstatic int
Get the Drill patch version from pomstatic String
Get the Drill version qualifier from pomstatic String
Get the Drill version from pom
-
Field Details
-
VERSION
The version extracted from Maven POM file at build time.
-
-
Constructor Details
-
DrillVersionInfo
public DrillVersionInfo()
-
-
Method Details
-
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
Get the Drill version qualifier from pom- Returns:
- suffix if assuming the version number is x.y.z(-suffix), or an empty string
-