hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Tschetter (JIRA)" <j...@apache.org>
Subject [jira] Created: (HBASE-1865) 0.20.0 TableInputFormatBase NPE
Date Thu, 24 Sep 2009 21:04:16 GMT
0.20.0 TableInputFormatBase NPE
-------------------------------

                 Key: HBASE-1865
                 URL: https://issues.apache.org/jira/browse/HBASE-1865
             Project: Hadoop HBase
          Issue Type: Bug
    Affects Versions: 0.20.0
            Reporter: Eric Tschetter


Spot the bug in this code:

public List<InputSplit> getSplits(JobContext context) throws IOException {
    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.");
    }
...
}

Should check if the table is null before calling a method on it.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message