HBASE-16792 - reverting to change commit message

This commit is contained in:
Ramkrishna 2016-10-17 12:24:17 +05:30
parent 3a0dbf71a9
commit bda5fd5a11
3 changed files with 4 additions and 19 deletions

View File

@ -43,7 +43,6 @@ import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.ClassSize;
import org.apache.hadoop.io.IOUtils;
import org.apache.hadoop.io.RawComparator;
import com.google.common.annotations.VisibleForTesting;
/**
@ -2642,20 +2641,6 @@ public class KeyValue implements ExtendedCell {
this.rowLen = Bytes.toShort(this.bytes, this.offset);
}
public void set(KeyOnlyKeyValue keyOnlyKeyValue) {
this.bytes = keyOnlyKeyValue.bytes;
this.length = keyOnlyKeyValue.length;
this.offset = keyOnlyKeyValue.offset;
this.rowLen = keyOnlyKeyValue.rowLen;
}
public void clear() {
rowLen = -1;
bytes = null;
offset = 0;
length = 0;
}
@Override
public int getKeyOffset() {
return this.offset;

View File

@ -139,7 +139,7 @@ abstract class BufferedDataBlockEncoder extends AbstractDataBlockEncoder {
protected void invalidate() {
valueOffset = -1;
tagsCompressedLength = 0;
currentKey.clear();
currentKey = new KeyValue.KeyOnlyKeyValue();
uncompressTags = true;
currentBuffer = null;
}
@ -188,7 +188,7 @@ abstract class BufferedDataBlockEncoder extends AbstractDataBlockEncoder {
keyBuffer, nextState.lastCommonPrefix, nextState.keyLength
- nextState.lastCommonPrefix);
}
currentKey.set(nextState.currentKey);
currentKey = nextState.currentKey;
valueOffset = nextState.valueOffset;
keyLength = nextState.keyLength;

View File

@ -356,9 +356,9 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
// We need to ensure that while we are calculating the smallestReadPoint
// no new RegionScanners can grab a readPoint that we are unaware of.
// We achieve this by synchronizing on the scannerReadPoints object.
synchronized (scannerReadPoints) {
synchronized(scannerReadPoints) {
minimumReadPoint = mvcc.getReadPoint();
for (Long readPoint : this.scannerReadPoints.values()) {
for (Long readPoint: this.scannerReadPoints.values()) {
if (readPoint < minimumReadPoint) {
minimumReadPoint = readPoint;
}