HBASE-11437 Modify cell tag handling code to treat the length as unsigned. - Addendum
This commit is contained in:
parent
39100cb1d1
commit
620616050e
|
@ -46,7 +46,7 @@ public final class VisibilityConstants {
|
||||||
**/
|
**/
|
||||||
public static final byte VISIBILITY_SERIALIZATION_VERSION = 1;
|
public static final byte VISIBILITY_SERIALIZATION_VERSION = 1;
|
||||||
/** Byte representation of the visibility_serialization_version **/
|
/** Byte representation of the visibility_serialization_version **/
|
||||||
public static final byte[] SORTED_ORDINAL_SERIALIZATION_FORMAT = Bytes
|
public static final byte[] SORTED_ORDINAL_SERIALIZATION_FORMAT =
|
||||||
.toBytes(VISIBILITY_SERIALIZATION_VERSION);
|
new byte[] { VISIBILITY_SERIALIZATION_VERSION };
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,7 +181,7 @@ public class VisibilityUtils {
|
||||||
while (tagsIterator.hasNext()) {
|
while (tagsIterator.hasNext()) {
|
||||||
Tag tag = tagsIterator.next();
|
Tag tag = tagsIterator.next();
|
||||||
if (tag.getType() == VisibilityUtils.VISIBILITY_EXP_SERIALIZATION_TAG_TYPE) {
|
if (tag.getType() == VisibilityUtils.VISIBILITY_EXP_SERIALIZATION_TAG_TYPE) {
|
||||||
int serializationVersion = Bytes.toShort(tag.getBuffer());
|
int serializationVersion = tag.getBuffer()[tag.getTagOffset()];
|
||||||
if (serializationVersion == VisibilityConstants.VISIBILITY_SERIALIZATION_VERSION) {
|
if (serializationVersion == VisibilityConstants.VISIBILITY_SERIALIZATION_VERSION) {
|
||||||
sortedOrder = true;
|
sortedOrder = true;
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue