HBASE-9307 HalfStoreFileReader needs to handle the faked key else compactions

go into infinite loops


git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1517987 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jean-Daniel Cryans 2013-08-27 21:00:29 +00:00
parent d6c13b39c2
commit f6c74ca78d
1 changed files with 4 additions and 0 deletions

View File

@ -27,6 +27,7 @@ import org.apache.hadoop.classification.InterfaceAudience;
import org.apache.hadoop.fs.FSDataInputStream;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding;
@ -195,6 +196,9 @@ public class HalfStoreFileReader extends StoreFile.Reader {
public boolean seekTo() throws IOException {
if (top) {
int r = this.delegate.seekTo(splitkey);
if (r == HConstants.INDEX_KEY_MAGIC) {
return true;
}
if (r < 0) {
// midkey is < first key in file
return this.delegate.seekTo();