HADOOP-2599 Some minor improvements to changes in HADOOP-2443

git-svn-id: https://svn.apache.org/repos/asf/hadoop/core/trunk/src/contrib/hbase@617725 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-02-02 00:53:48 +00:00
parent b7d932f4dc
commit e9230096ee
3 changed files with 10 additions and 2 deletions

View File

@ -16,6 +16,8 @@ Trunk (unreleased changes)
HADOOP-2731 Under load, regions become extremely large and eventually cause
region servers to become unresponsive
HADOOP-2693 NPE in getClosestRowBefore (Bryan Duxbury & Stack)
HADOOP-2599 Some minor improvements to changes in HADOOP-2443
(Bryan Duxbury & Stack)
IMPROVEMENTS
HADOOP-2555 Refactor the HTable#get and HTable#getRow methods to avoid

View File

@ -257,7 +257,7 @@ public class HConnectionManager implements HConstants {
// open a scanner over the meta region
scannerId = server.openScanner(
metaLocation.getRegionInfo().getRegionName(),
COLUMN_FAMILY_ARRAY, EMPTY_START_ROW, LATEST_TIMESTAMP,
COLUMN_FAMILY_ARRAY, startRow, LATEST_TIMESTAMP,
null);
// iterate through the scanner, accumulating unique table names
@ -296,7 +296,7 @@ public class HConnectionManager implements HConstants {
server.close(scannerId);
}
}
} while (startRow.compareTo(EMPTY_START_ROW) != 0);
} while (startRow.compareTo(LAST_ROW) != 0);
return uniqueTables.toArray(new HTableDescriptor[uniqueTables.size()]);
}

View File

@ -167,6 +167,12 @@ public interface HConstants {
*/
static final Text EMPTY_START_ROW = EMPTY_TEXT;
/**
* Used by scanners and others when they're trying to detect the end of a
* table
*/
static final Text LAST_ROW = EMPTY_TEXT;
/** When we encode strings, we always specify UTF8 encoding */
static final String UTF8_ENCODING = "UTF-8";