HBASE-1644 Result.row is cached in getRow; this breaks MapReduce

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@793115 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2009-07-10 21:34:16 +00:00
parent 6691578821
commit 10c178fcb0
2 changed files with 6 additions and 6 deletions

View File

@ -254,6 +254,8 @@ Release 0.20.0 - Unreleased
HBASE-1641 Stargate build.xml causes error in Eclipse
HBASE-1627 TableInputFormatBase#nextKeyValue catches the wrong exception
(Doğacan Güney via Stack)
HBASE-1644 Result.row is cached in getRow; this breaks MapReduce
(Doğacan Güney via Stack)
IMPROVEMENTS
HBASE-1089 Add count of regions on filesystem to master UI; add percentage

View File

@ -198,19 +198,17 @@ extends InputFormat<ImmutableBytesWritable, Result> {
public boolean nextKeyValue() throws IOException, InterruptedException {
if (key == null) key = new ImmutableBytesWritable();
if (value == null) value = new Result();
Result result;
try {
result = this.scanner.next();
value = this.scanner.next();
} catch (IOException e) {
LOG.debug("recovered from " + StringUtils.stringifyException(e));
restart(lastRow);
scanner.next(); // skip presumed already mapped row
result = scanner.next();
value = scanner.next();
}
if (result != null && result.size() > 0) {
key.set(result.getRow());
if (value != null && value.size() > 0) {
key.set(value.getRow());
lastRow = key.get();
Writables.copyWritable(result, value);
return true;
}
return false;