HBASE-11437 Modify cell tag handling code to treat the length as unsigned. - Addendum

This commit is contained in:
anoopsjohn 2014-07-14 15:25:12 +05:30
parent 39100cb1d1
commit 620616050e
2 changed files with 3 additions and 3 deletions

View File

@ -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 };
} }

View File

@ -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;