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

This commit is contained in:
anoopsjohn 2014-07-14 15:24:09 +05:30
parent 01a7dda255
commit 470d00ea9a
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;
/** Byte representation of the visibility_serialization_version **/
public static final byte[] SORTED_ORDINAL_SERIALIZATION_FORMAT = Bytes
.toBytes(VISIBILITY_SERIALIZATION_VERSION);
public static final byte[] SORTED_ORDINAL_SERIALIZATION_FORMAT =
new byte[] { VISIBILITY_SERIALIZATION_VERSION };
}

View File

@ -181,7 +181,7 @@ public class VisibilityUtils {
while (tagsIterator.hasNext()) {
Tag tag = tagsIterator.next();
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) {
sortedOrder = true;
continue;