HADOOP-2322 getRow(row, TS) client interface not properly connected

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk/src/contrib/hbase@600019 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2007-11-30 23:59:56 +00:00
parent 554146cc64
commit fdff7385a6
2 changed files with 3 additions and 18 deletions

View File

@ -46,6 +46,7 @@ Trunk (unreleased changes)
HADOOP-2304 Abbreviated symbol parsing error of dir path in jar command HADOOP-2304 Abbreviated symbol parsing error of dir path in jar command
(Edward Yoon via Stack) (Edward Yoon via Stack)
HADOOP-2320 Committed TestGet2 is managled (breaks build). HADOOP-2320 Committed TestGet2 is managled (breaks build).
HADOOP-2322 getRow(row, TS) client interface not properly connected
IMPROVEMENTS IMPROVEMENTS
HADOOP-2401 Add convenience put method that takes writable HADOOP-2401 Add convenience put method that takes writable

View File

@ -1271,23 +1271,7 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
/** {@inheritDoc} */ /** {@inheritDoc} */
public MapWritable getRow(final Text regionName, final Text row) public MapWritable getRow(final Text regionName, final Text row)
throws IOException { throws IOException {
return getRow(regionName, row, HConstants.LATEST_TIMESTAMP);
checkOpen();
requestCount.incrementAndGet();
try {
HRegion region = getRegion(regionName);
MapWritable result = new MapWritable();
Map<Text, byte[]> map = region.getFull(row);
for (Map.Entry<Text, byte []> es: map.entrySet()) {
result.put(new HStoreKey(row, es.getKey()),
new ImmutableBytesWritable(es.getValue()));
}
return result;
} catch (IOException e) {
checkFileSystem();
throw e;
}
} }
/** {@inheritDoc} */ /** {@inheritDoc} */
@ -1299,7 +1283,7 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
try { try {
HRegion region = getRegion(regionName); HRegion region = getRegion(regionName);
MapWritable result = new MapWritable(); MapWritable result = new MapWritable();
Map<Text, byte[]> map = region.getFull(row); Map<Text, byte[]> map = region.getFull(row, ts);
for (Map.Entry<Text, byte []> es: map.entrySet()) { for (Map.Entry<Text, byte []> es: map.entrySet()) {
result.put(new HStoreKey(row, es.getKey()), result.put(new HStoreKey(row, es.getKey()),
new ImmutableBytesWritable(es.getValue())); new ImmutableBytesWritable(es.getValue()));