HBASE-3205 TableRecordReaderImpl.restart NPEs when first next is restarted

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1032761 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jean-Daniel Cryans 2010-11-08 22:10:38 +00:00
parent 160395c9f7
commit a68b2c6645
2 changed files with 8 additions and 0 deletions

View File

@ -657,6 +657,7 @@ Release 0.90.0 - Unreleased
and it'll hold up regionserver shutdown
HBASE-3204 Reenable deferred log flush
HBASE-3195 [rest] Fix TestTransform breakage on Hudson
HBASE-3205 TableRecordReaderImpl.restart NPEs when first next is restarted
IMPROVEMENTS

View File

@ -132,6 +132,13 @@ public class TableRecordReaderImpl {
value = this.scanner.next();
} catch (IOException e) {
LOG.debug("recovered from " + StringUtils.stringifyException(e));
if (lastRow == null) {
LOG.warn("We are restarting the first next() invocation," +
" if your mapper's restarted a few other times like this" +
" then you should consider killing this job and investigate" +
" why it's taking so long.");
lastRow = scan.getStartRow();
}
restart(lastRow);
scanner.next(); // skip presumed already mapped row
value = scanner.next();