diff --git a/CHANGES.txt b/CHANGES.txt index 4de240b5384..d08cdbd225b 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -86,7 +86,8 @@ Trunk (unreleased changes) HADOOP-2441 Fix build failures in TestHBaseCluster HADOOP-2451 End key is incorrectly assigned in many region splits HADOOP-2455 Error in Help-string of CREATE command (Edward Yoon via Stack) - + HADOOP-2465 When split parent regions are cleaned up, not all the columns are + deleted IMPROVEMENTS HADOOP-2401 Add convenience put method that takes writable @@ -131,6 +132,8 @@ Trunk (unreleased changes) HADOOP-2351 If select command returns no result, it doesn't need to show the header information (Edward Yoon via Stack) HADOOP-2285 Add being able to shutdown regionservers (Dennis Kubes via Stack) + HADOOP-2458 HStoreFile.writeSplitInfo should just call + HStoreFile.Reference.write diff --git a/src/java/org/apache/hadoop/hbase/HMaster.java b/src/java/org/apache/hadoop/hbase/HMaster.java index d08a8a46ae6..240f43209f1 100644 --- a/src/java/org/apache/hadoop/hbase/HMaster.java +++ b/src/java/org/apache/hadoop/hbase/HMaster.java @@ -343,6 +343,8 @@ public class HMaster extends Thread implements HConstants, HMasterInterface, b.delete(lockid, COL_REGIONINFO); b.delete(lockid, COL_SERVER); b.delete(lockid, COL_STARTCODE); + b.delete(lockid, COL_SPLITA); + b.delete(lockid, COL_SPLITB); srvr.batchUpdate(metaRegionName, System.currentTimeMillis(), b); result = true; } else if (LOG.isDebugEnabled()) { diff --git a/src/java/org/apache/hadoop/hbase/HStoreFile.java b/src/java/org/apache/hadoop/hbase/HStoreFile.java index 5b465572970..b80ef56e16a 100644 --- a/src/java/org/apache/hadoop/hbase/HStoreFile.java +++ b/src/java/org/apache/hadoop/hbase/HStoreFile.java @@ -493,10 +493,7 @@ public class HStoreFile implements HConstants, WritableComparable { } FSDataOutputStream out = fs.create(p); try { - out.writeUTF(getReference().getEncodedRegionName()); - getReference().getMidkey().write(out); - out.writeLong(getReference().getFileId()); - out.writeBoolean(isTopFileRegion(getReference().getFileRegion())); + reference.write(out); } finally { out.close(); } @@ -507,19 +504,14 @@ public class HStoreFile implements HConstants, WritableComparable { */ static Reference readSplitInfo(final Path p, final FileSystem fs) throws IOException { - Reference r = null; FSDataInputStream in = fs.open(p); try { - String rn = in.readUTF(); - HStoreKey midkey = new HStoreKey(); - midkey.readFields(in); - long fid = in.readLong(); - boolean tmp = in.readBoolean(); - r = new Reference(rn, fid, midkey, tmp? Range.top: Range.bottom); + Reference r = new Reference(); + r.readFields(in); + return r; } finally { in.close(); } - return r; } private void createOrFail(final FileSystem fs, final Path p)