HBASE-516 HStoreFile.finalKey does not update the final key if it is not the top region of a split region

Modified HStoreFile$HalfMapFileReader.finalKey

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@637002 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jim Kellerman 2008-03-14 05:57:54 +00:00
parent 97d4b9fd3c
commit 5d4ed8436d
2 changed files with 13 additions and 1 deletions

View File

@ -40,6 +40,8 @@ Hbase Change Log
HBASE-27 hregioninfo cell empty in meta table
HBASE-501 Empty region server address in info:server entry and a
startcode of -1 in .META.
HBASE-516 HStoreFile.finalKey does not update the final key if it is not
the top region of a split region
IMPROVEMENTS
HBASE-415 Rewrite leases to use DelayedBlockingQueue instead of polling

View File

@ -19,9 +19,12 @@
*/
package org.apache.hadoop.hbase.regionserver;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInput;
import java.io.DataInputStream;
import java.io.DataOutput;
import java.io.DataOutputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
@ -892,7 +895,14 @@ public class HStoreFile implements HConstants {
} else {
reset();
Writable value = new ImmutableBytesWritable();
key = super.getClosest(midkey, value, true);
WritableComparable k = super.getClosest(midkey, value, true);
ByteArrayOutputStream byteout = new ByteArrayOutputStream();
DataOutputStream out = new DataOutputStream(byteout);
k.write(out);
ByteArrayInputStream bytein =
new ByteArrayInputStream(byteout.toByteArray());
DataInputStream in = new DataInputStream(bytein);
key.readFields(in);
}
}