@InterfaceAudience.Private public final class VersionInfoUtil extends Object
Modifier | Constructor and Description |
---|---|
private |
VersionInfoUtil() |
Modifier and Type | Method and Description |
---|---|
private static int |
buildVersionNumber(int major,
int minor,
int patch)
Pack the full number version in a int.
|
static boolean |
currentClientHasMinimumVersion(int major,
int minor) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.VersionInfo |
getCurrentClientVersionInfo()
Returns the versionInfo extracted from the current RpcCallContext
|
private static String[] |
getVersionComponents(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.VersionInfo versionInfo)
Returns the version components Examples: "1.4.3" returns [1, 4, 3], "4.5.6-SNAPSHOT" returns
[4, 5, 6, "SNAPSHOT"]
|
static int |
getVersionNumber(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.VersionInfo versionInfo)
Pack the full number version in a int.
|
static boolean |
hasMinimumVersion(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.VersionInfo versionInfo,
int major,
int minor) |
static String |
versionNumberToString(int version)
n * @return the passed-in
version int as a version String (e.g. |
private VersionInfoUtil()
public static boolean currentClientHasMinimumVersion(int major, int minor)
public static boolean hasMinimumVersion(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.VersionInfo versionInfo, int major, int minor)
public static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.VersionInfo getCurrentClientVersionInfo()
public static String versionNumberToString(int version)
version
int as a version String (e.g. 0x0103004 is
1.3.4)public static int getVersionNumber(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.VersionInfo versionInfo)
versionInfo
- the VersionInfo object to packprivate static int buildVersionNumber(int major, int minor, int patch)
major
- version major numberminor
- version minor numberpatch
- version patch numberprivate static String[] getVersionComponents(org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.VersionInfo versionInfo)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.