HBASE-1309 HFile rejects key in Memcache with empty value
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@762889 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
88a42b8ce6
commit
90e8591cb4
|
@ -137,6 +137,7 @@ Release 0.20.0 - Unreleased
|
|||
(Jonathan Gray via Andrew Purtell)
|
||||
HBASE-1205 RegionServers should find new master when a new master comes up
|
||||
(Nitay Joffe via Andrew Purtell)
|
||||
HBASE-1309 HFile rejects key in Memcache with empty value
|
||||
|
||||
Release 0.19.0 - 01/21/2009
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -452,7 +452,9 @@ public class HFile {
|
|||
this.out.writeInt(value.length);
|
||||
this.valuelength += valuelength;
|
||||
this.out.write(key);
|
||||
if (value.length > 0) {
|
||||
this.out.write(value);
|
||||
}
|
||||
// Are we the first key in this block?
|
||||
if (this.firstKey == null) this.firstKey = key;
|
||||
this.lastKey = key;
|
||||
|
@ -481,8 +483,8 @@ public class HFile {
|
|||
}
|
||||
|
||||
private void checkValue(final byte [] value) throws IOException {
|
||||
if (value == null || value.length <= 0) {
|
||||
throw new IOException("Value cannot be null or empty");
|
||||
if (value == null) {
|
||||
throw new IOException("Value cannot be null");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue