HBASE-13630 - Remove dead code in BufferedDataEncoder (Ram)
This commit is contained in:
parent
11b76732c0
commit
52f635df00
|
@ -700,7 +700,6 @@ abstract class BufferedDataBlockEncoder implements DataBlockEncoder {
|
||||||
KeyValue.KeyOnlyKeyValue currentCell = new KeyValue.KeyOnlyKeyValue();
|
KeyValue.KeyOnlyKeyValue currentCell = new KeyValue.KeyOnlyKeyValue();
|
||||||
do {
|
do {
|
||||||
int comp;
|
int comp;
|
||||||
if (comparator != null) {
|
|
||||||
currentCell.setKey(current.keyBuffer, 0, current.keyLength);
|
currentCell.setKey(current.keyBuffer, 0, current.keyLength);
|
||||||
if (current.lastCommonPrefix != 0) {
|
if (current.lastCommonPrefix != 0) {
|
||||||
// The KV format has row key length also in the byte array. The
|
// The KV format has row key length also in the byte array. The
|
||||||
|
@ -713,10 +712,8 @@ abstract class BufferedDataBlockEncoder implements DataBlockEncoder {
|
||||||
if (current.lastCommonPrefix <= 2) {
|
if (current.lastCommonPrefix <= 2) {
|
||||||
rowCommonPrefix = 0;
|
rowCommonPrefix = 0;
|
||||||
}
|
}
|
||||||
rowCommonPrefix += findCommonPrefixInRowPart(seekCell, currentCell,
|
rowCommonPrefix += findCommonPrefixInRowPart(seekCell, currentCell, rowCommonPrefix);
|
||||||
rowCommonPrefix);
|
comp = compareCommonRowPrefix(seekCell, currentCell, rowCommonPrefix);
|
||||||
comp = compareCommonRowPrefix(seekCell, currentCell,
|
|
||||||
rowCommonPrefix);
|
|
||||||
if (comp == 0) {
|
if (comp == 0) {
|
||||||
comp = compareTypeBytes(seekCell, currentCell);
|
comp = compareTypeBytes(seekCell, currentCell);
|
||||||
if (comp == 0) {
|
if (comp == 0) {
|
||||||
|
@ -725,10 +722,9 @@ abstract class BufferedDataBlockEncoder implements DataBlockEncoder {
|
||||||
0,
|
0,
|
||||||
Math.min(familyCommonPrefix,
|
Math.min(familyCommonPrefix,
|
||||||
current.lastCommonPrefix - (3 + currentCell.getRowLength())));
|
current.lastCommonPrefix - (3 + currentCell.getRowLength())));
|
||||||
familyCommonPrefix += findCommonPrefixInFamilyPart(seekCell,
|
familyCommonPrefix += findCommonPrefixInFamilyPart(seekCell, currentCell,
|
||||||
currentCell, familyCommonPrefix);
|
|
||||||
comp = compareCommonFamilyPrefix(seekCell, currentCell,
|
|
||||||
familyCommonPrefix);
|
familyCommonPrefix);
|
||||||
|
comp = compareCommonFamilyPrefix(seekCell, currentCell, familyCommonPrefix);
|
||||||
if (comp == 0) {
|
if (comp == 0) {
|
||||||
// subtract the rowkey fixed length and the family key fixed
|
// subtract the rowkey fixed length and the family key fixed
|
||||||
// length
|
// length
|
||||||
|
@ -738,10 +734,9 @@ abstract class BufferedDataBlockEncoder implements DataBlockEncoder {
|
||||||
qualCommonPrefix,
|
qualCommonPrefix,
|
||||||
current.lastCommonPrefix
|
current.lastCommonPrefix
|
||||||
- (3 + currentCell.getRowLength() + currentCell.getFamilyLength())));
|
- (3 + currentCell.getRowLength() + currentCell.getFamilyLength())));
|
||||||
qualCommonPrefix += findCommonPrefixInQualifierPart(seekCell,
|
qualCommonPrefix += findCommonPrefixInQualifierPart(seekCell, currentCell,
|
||||||
currentCell, qualCommonPrefix);
|
|
||||||
comp = compareCommonQualifierPrefix(seekCell, currentCell,
|
|
||||||
qualCommonPrefix);
|
qualCommonPrefix);
|
||||||
|
comp = compareCommonQualifierPrefix(seekCell, currentCell, qualCommonPrefix);
|
||||||
if (comp == 0) {
|
if (comp == 0) {
|
||||||
comp = CellComparator.compareTimestamps(seekCell, currentCell);
|
comp = CellComparator.compareTimestamps(seekCell, currentCell);
|
||||||
if (comp == 0) {
|
if (comp == 0) {
|
||||||
|
@ -759,10 +754,6 @@ abstract class BufferedDataBlockEncoder implements DataBlockEncoder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
Cell r = new KeyValue.KeyOnlyKeyValue(current.keyBuffer, 0, current.keyLength);
|
|
||||||
comp = comparator.compareKeyIgnoresMvcc(seekCell, r);
|
|
||||||
}
|
|
||||||
if (comp == 0) { // exact match
|
if (comp == 0) { // exact match
|
||||||
if (seekBefore) {
|
if (seekBefore) {
|
||||||
if (!previous.isValid()) {
|
if (!previous.isValid()) {
|
||||||
|
|
Loading…
Reference in New Issue