hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r818651 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java
Date Thu, 24 Sep 2009 23:04:22 GMT
Author: stack
Date: Thu Sep 24 23:04:21 2009
New Revision: 818651

URL: http://svn.apache.org/viewvc?rev=818651&view=rev
Log:
HBASE-1865 0.20.0 TableInputFormatBase NPE

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=818651&r1=818650&r2=818651&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Thu Sep 24 23:04:21 2009
@@ -44,6 +44,7 @@
                split (Cosmin Lehane via Stack)
    HBASE-1809  NPE thrown in BoundedRangeFileInputStream
    HBASE-1859  Misc shell fixes patch (Kyle Oba via Stack)
+   HBASE-1865  0.20.0 TableInputFormatBase NPE
 
   IMPROVEMENTS
    HBASE-1760  Cleanup TODOs in HTable

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java?rev=818651&r1=818650&r2=818651&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java
(original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/mapreduce/TableInputFormatBase.java
Thu Sep 24 23:04:21 2009
@@ -269,13 +269,13 @@
    */
   @Override
   public List<InputSplit> getSplits(JobContext context) throws IOException {
+    if (table == null) {
+      throw new IOException("No table was provided.");
+    }
     byte [][] startKeys = table.getStartKeys();
     if (startKeys == null || startKeys.length == 0) {
       throw new IOException("Expecting at least one region.");
     }
-    if (table == null) {
-      throw new IOException("No table was provided.");
-    }
     int realNumSplits = startKeys.length;
     InputSplit[] splits = new InputSplit[realNumSplits];
     int middle = startKeys.length / realNumSplits;



Mime
View raw message