HBASE-3386 NPE in TableRecordReaderImpl.restart

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1052051 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jean-Daniel Cryans 2010-12-22 19:54:11 +00:00
parent 94cc5237b0
commit bfe27f5764
2 changed files with 6 additions and 0 deletions

View File

@ -802,6 +802,7 @@ Release 0.90.0 - Unreleased
HBASE-3374 Our jruby jar has *GPL jars in it; fix
HBASE-3343 Server not shutting down after losing log lease
HBASE-3381 Interrupt of a region open comes across as a successful open
HBASE-3386 NPE in TableRecordReaderImpl.restart
IMPROVEMENTS

View File

@ -94,6 +94,11 @@ extends InputFormat<ImmutableBytesWritable, Result> {
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