apurtell commented on a change in pull request #3244:
URL: https://github.com/apache/hbase/pull/3244#discussion_r629802049
##########
File path: hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java
##########
@@ -230,6 +230,11 @@ public static long getKeyDataStructureSize(int rlength,
int flength, int qlength
DeleteColumn((byte)12),
DeleteFamily((byte)14),
+ // Effective maximum is 127 (Byte.MAX_VALUE). We set the high order bit of
the
+ // type byte in the WAL codecs to indicate, in a backwards compatible way,
if the
+ // value is compressed there.
+ EffectiveMaximum((byte)Byte.MAX_VALUE),
+
// Maximum is used when searching; you look from maximum on down.
Maximum((byte)255);
Review comment:
It is simpler if we don't try to conditionally compress values. No high
bit twiddling. So there is no leakage into KeyValue in this case and no magic
values.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]