@InterfaceAudience.Private public final class VersionInfoUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
VersionInfoUtil.ServiceCallFunction<T1,T2,R,E extends Throwable>
We intend to use the local version for service call shortcut(s), so we use an interface
compatible with a typical service call, with 2 args, return type, and an exception type.
|
| Modifier and Type | Method and Description |
|---|---|
static <T1,T2,R,E extends Throwable> |
callWithVersion(VersionInfoUtil.ServiceCallFunction<T1,T2,R,E> f,
T1 t1,
T2 t2) |
static boolean |
currentClientHasMinimumVersion(int major,
int minor) |
static org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.VersionInfo |
getCurrentClientVersionInfo() |
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. |
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 <T1,T2,R,E extends Throwable> R callWithVersion(VersionInfoUtil.ServiceCallFunction<T1,T2,R,E> f, T1 t1, T2 t2) throws E extends Throwable
E extends Throwablepublic 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 packCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.