diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/OrderedBytes.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/OrderedBytes.java index 499e34c..b9ce125 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/OrderedBytes.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/OrderedBytes.java @@ -1503,7 +1503,8 @@ public class OrderedBytes { * false otherwise. */ public static boolean isEncodedValue(PositionedByteRange src) { - return isNull(src) || isNumeric(src) || isFixedInt32(src) || isFixedInt64(src) + return isNull(src) || isNumeric(src) || isFixedInt8(src) || isFixedInt16(src) + || isFixedInt32(src) || isFixedInt64(src) || isFixedFloat32(src) || isFixedFloat64(src) || isText(src) || isBlobCopy(src) || isBlobVar(src); } @@ -1555,6 +1556,24 @@ public class OrderedBytes { /** * Return true when the next encoded value in {@code src} uses fixed-width + * Int8 encoding, false otherwise. + */ + public static boolean isFixedInt8(PositionedByteRange src) { + return FIXED_INT8 == + (-1 == Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek()); + } + + /** + * Return true when the next encoded value in {@code src} uses fixed-width + * Int16 encoding, false otherwise. + */ + public static boolean isFixedInt16(PositionedByteRange src) { + return FIXED_INT16 == + (-1 == Integer.signum(src.peek()) ? DESCENDING : ASCENDING).apply(src.peek()); + } + + /** + * Return true when the next encoded value in {@code src} uses fixed-width * Int32 encoding, false otherwise. */ public static boolean isFixedInt32(PositionedByteRange src) {