You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2012/05/23 17:59:10 UTC

svn commit: r1341919 - /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java

Author: tedyu
Date: Wed May 23 15:59:10 2012
New Revision: 1341919

URL: http://svn.apache.org/viewvc?rev=1341919&view=rev
Log:
HBASE-6069 TableInputFormatBase#createRecordReader() doesn't initialize TableRecordReader which causes NPE (Jie Huang)

Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java?rev=1341919&r1=1341918&r2=1341919&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java Wed May 23 15:59:10 2012
@@ -20,6 +20,7 @@
 package org.apache.hadoop.hbase.mapreduce;
 
 import java.io.IOException;
+import java.io.InterruptedIOException;
 import java.net.InetAddress;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -124,6 +125,11 @@ extends InputFormat<ImmutableBytesWritab
     sc.setStopRow(tSplit.getEndRow());
     trr.setScan(sc);
     trr.setHTable(table);
+    try {
+      trr.initialize(tSplit, context);
+    } catch (InterruptedException e) {
+      throw new InterruptedIOException(e.getMessage());
+    }
     return trr;
   }