HADOOP-1534. [hbase] Memcache scanner fails if start key not present
* src/contrib/hbase/src/java/org/apache/hadoop/hbase/HMemcache.java (findFirstRow): Change compare from startsWith -- looking for an 'exact' match -- to instead use compareTo and if >= 0, then we are at first key. * src/contrib/hbase/src/java/org/apache/hadoop/hbase/HRegionServer.java Add logging of problematic directory if server won't start because log file exists. git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@551039 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6455364281
commit
a31d0e5f31
|
@ -38,5 +38,5 @@ Trunk (unreleased changes)
|
|||
23. HADOOP-1509. Made methods/inner classes in HRegionServer and HClient protected
|
||||
instead of private for easier extension. Also made HRegion and HRegionInfo public too.
|
||||
Added an hbase-default.xml property for specifying what HRegionInterface extension to use
|
||||
for proxy server connection.
|
||||
|
||||
for proxy server connection.
|
||||
24. HADOOP-1534. [hbase] Memcache scanner fails if start key not present
|
||||
|
|
|
@ -332,8 +332,8 @@ public class HMemcache {
|
|||
* @return true if this is the first row
|
||||
*/
|
||||
boolean findFirstRow(int i, Text firstRow) {
|
||||
return ((firstRow.getLength() == 0)
|
||||
|| (keys[i].getRow().toString().startsWith(firstRow.toString())));
|
||||
return firstRow.getLength() == 0 ||
|
||||
keys[i].getRow().compareTo(firstRow) >= 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -446,7 +446,7 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
|
|||
if(fs.exists(logdir)) {
|
||||
throw new RegionServerRunningException("region server already running at " +
|
||||
this.serverInfo.getServerAddress().toString() + " because logdir " +
|
||||
" exists");
|
||||
logdir.toString() + " exists");
|
||||
}
|
||||
|
||||
this.log = new HLog(fs, logdir, conf);
|
||||
|
|
Loading…
Reference in New Issue