You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jd...@apache.org on 2010/12/22 20:54:53 UTC

svn commit: r1052052 - in /hbase/branches/0.90: CHANGES.txt src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java

Author: jdcryans
Date: Wed Dec 22 19:54:53 2010
New Revision: 1052052

URL: http://svn.apache.org/viewvc?rev=1052052&view=rev
Log:
HBASE-3386  NPE in TableRecordReaderImpl.restart

Modified:
    hbase/branches/0.90/CHANGES.txt
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1052052&r1=1052051&r2=1052052&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Wed Dec 22 19:54:53 2010
@@ -766,6 +766,7 @@ Release 0.90.0 - Unreleased
    HBASE-3343  Server not shutting down after losing log lease
    HBASE-3381  Interrupt of a region open comes across as a successful open
    HBASE-3380  Master failover can split logs of live servers
+   HBASE-3386  NPE in TableRecordReaderImpl.restart
 
 
   IMPROVEMENTS

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java?rev=1052052&r1=1052051&r2=1052052&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java (original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java Wed Dec 22 19:54:53 2010
@@ -94,6 +94,11 @@ extends InputFormat<ImmutableBytesWritab
   public RecordReader<ImmutableBytesWritable, Result> createRecordReader(
       InputSplit split, TaskAttemptContext context)
   throws IOException {
+    if (table == null) {
+      throw new IOException("Cannot create a record reader because of a" +
+          " previous error. Please look at the previous logs lines from" +
+          " the task's full log for more details.");
+    }
     TableSplit tSplit = (TableSplit) split;
     TableRecordReader trr = this.tableRecordReader;
     // if no table record reader was provided use default