HBASE-13630 - Remove dead code in BufferedDataEncoder (Ram)

This commit is contained in:
ramkrishna 2015-05-08 09:15:46 +05:30
parent 11b76732c0
commit 52f635df00
1 changed files with 44 additions and 53 deletions

View File

@ -700,7 +700,6 @@ abstract class BufferedDataBlockEncoder implements DataBlockEncoder {
KeyValue.KeyOnlyKeyValue currentCell = new KeyValue.KeyOnlyKeyValue();
do {
int comp;
if (comparator != null) {
currentCell.setKey(current.keyBuffer, 0, current.keyLength);
if (current.lastCommonPrefix != 0) {
// 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) {
rowCommonPrefix = 0;
}
rowCommonPrefix += findCommonPrefixInRowPart(seekCell, currentCell,
rowCommonPrefix);
comp = compareCommonRowPrefix(seekCell, currentCell,
rowCommonPrefix);
rowCommonPrefix += findCommonPrefixInRowPart(seekCell, currentCell, rowCommonPrefix);
comp = compareCommonRowPrefix(seekCell, currentCell, rowCommonPrefix);
if (comp == 0) {
comp = compareTypeBytes(seekCell, currentCell);
if (comp == 0) {
@ -725,10 +722,9 @@ abstract class BufferedDataBlockEncoder implements DataBlockEncoder {
0,
Math.min(familyCommonPrefix,
current.lastCommonPrefix - (3 + currentCell.getRowLength())));
familyCommonPrefix += findCommonPrefixInFamilyPart(seekCell,
currentCell, familyCommonPrefix);
comp = compareCommonFamilyPrefix(seekCell, currentCell,
familyCommonPrefix += findCommonPrefixInFamilyPart(seekCell, currentCell,
familyCommonPrefix);
comp = compareCommonFamilyPrefix(seekCell, currentCell, familyCommonPrefix);
if (comp == 0) {
// subtract the rowkey fixed length and the family key fixed
// length
@ -738,10 +734,9 @@ abstract class BufferedDataBlockEncoder implements DataBlockEncoder {
qualCommonPrefix,
current.lastCommonPrefix
- (3 + currentCell.getRowLength() + currentCell.getFamilyLength())));
qualCommonPrefix += findCommonPrefixInQualifierPart(seekCell,
currentCell, qualCommonPrefix);
comp = compareCommonQualifierPrefix(seekCell, currentCell,
qualCommonPrefix += findCommonPrefixInQualifierPart(seekCell, currentCell,
qualCommonPrefix);
comp = compareCommonQualifierPrefix(seekCell, currentCell, qualCommonPrefix);
if (comp == 0) {
comp = CellComparator.compareTimestamps(seekCell, currentCell);
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 (seekBefore) {
if (!previous.isValid()) {