From a68b2c6645aa92988c7d4feed3119a385be4f519 Mon Sep 17 00:00:00 2001 From: Jean-Daniel Cryans Date: Mon, 8 Nov 2010 22:10:38 +0000 Subject: [PATCH] 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 --- CHANGES.txt | 1 + .../hadoop/hbase/mapreduce/TableRecordReaderImpl.java | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index b384ec475d9..5f1b3c4fa16 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -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 diff --git a/src/main/java/org/apache/hadoop/hbase/mapreduce/TableRecordReaderImpl.java b/src/main/java/org/apache/hadoop/hbase/mapreduce/TableRecordReaderImpl.java index c1803dff747..dbb11e858be 100644 --- a/src/main/java/org/apache/hadoop/hbase/mapreduce/TableRecordReaderImpl.java +++ b/src/main/java/org/apache/hadoop/hbase/mapreduce/TableRecordReaderImpl.java @@ -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();