HADOOP-2458 HStoreFile.writeSplitInfo should just call HStoreFile.Reference.write
HADOOP-2458 HStoreFile.writeSplitInfo should just call HStoreFile.Reference.write git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@605466 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2630fd3cee
commit
83c09ebccc
|
@ -86,7 +86,8 @@ Trunk (unreleased changes)
|
||||||
HADOOP-2441 Fix build failures in TestHBaseCluster
|
HADOOP-2441 Fix build failures in TestHBaseCluster
|
||||||
HADOOP-2451 End key is incorrectly assigned in many region splits
|
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-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
|
IMPROVEMENTS
|
||||||
HADOOP-2401 Add convenience put method that takes writable
|
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
|
HADOOP-2351 If select command returns no result, it doesn't need to show the
|
||||||
header information (Edward Yoon via Stack)
|
header information (Edward Yoon via Stack)
|
||||||
HADOOP-2285 Add being able to shutdown regionservers (Dennis Kubes via Stack)
|
HADOOP-2285 Add being able to shutdown regionservers (Dennis Kubes via Stack)
|
||||||
|
HADOOP-2458 HStoreFile.writeSplitInfo should just call
|
||||||
|
HStoreFile.Reference.write
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -343,6 +343,8 @@ public class HMaster extends Thread implements HConstants, HMasterInterface,
|
||||||
b.delete(lockid, COL_REGIONINFO);
|
b.delete(lockid, COL_REGIONINFO);
|
||||||
b.delete(lockid, COL_SERVER);
|
b.delete(lockid, COL_SERVER);
|
||||||
b.delete(lockid, COL_STARTCODE);
|
b.delete(lockid, COL_STARTCODE);
|
||||||
|
b.delete(lockid, COL_SPLITA);
|
||||||
|
b.delete(lockid, COL_SPLITB);
|
||||||
srvr.batchUpdate(metaRegionName, System.currentTimeMillis(), b);
|
srvr.batchUpdate(metaRegionName, System.currentTimeMillis(), b);
|
||||||
result = true;
|
result = true;
|
||||||
} else if (LOG.isDebugEnabled()) {
|
} else if (LOG.isDebugEnabled()) {
|
||||||
|
|
|
@ -493,10 +493,7 @@ public class HStoreFile implements HConstants, WritableComparable {
|
||||||
}
|
}
|
||||||
FSDataOutputStream out = fs.create(p);
|
FSDataOutputStream out = fs.create(p);
|
||||||
try {
|
try {
|
||||||
out.writeUTF(getReference().getEncodedRegionName());
|
reference.write(out);
|
||||||
getReference().getMidkey().write(out);
|
|
||||||
out.writeLong(getReference().getFileId());
|
|
||||||
out.writeBoolean(isTopFileRegion(getReference().getFileRegion()));
|
|
||||||
} finally {
|
} finally {
|
||||||
out.close();
|
out.close();
|
||||||
}
|
}
|
||||||
|
@ -507,19 +504,14 @@ public class HStoreFile implements HConstants, WritableComparable {
|
||||||
*/
|
*/
|
||||||
static Reference readSplitInfo(final Path p, final FileSystem fs)
|
static Reference readSplitInfo(final Path p, final FileSystem fs)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
Reference r = null;
|
|
||||||
FSDataInputStream in = fs.open(p);
|
FSDataInputStream in = fs.open(p);
|
||||||
try {
|
try {
|
||||||
String rn = in.readUTF();
|
Reference r = new Reference();
|
||||||
HStoreKey midkey = new HStoreKey();
|
r.readFields(in);
|
||||||
midkey.readFields(in);
|
return r;
|
||||||
long fid = in.readLong();
|
|
||||||
boolean tmp = in.readBoolean();
|
|
||||||
r = new Reference(rn, fid, midkey, tmp? Range.top: Range.bottom);
|
|
||||||
} finally {
|
} finally {
|
||||||
in.close();
|
in.close();
|
||||||
}
|
}
|
||||||
return r;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createOrFail(final FileSystem fs, final Path p)
|
private void createOrFail(final FileSystem fs, final Path p)
|
||||||
|
|
Loading…
Reference in New Issue