Description
Spot the bug in this code:
public List<InputSplit> getSplits(JobContext context) throws IOException {
byte [][] startKeys = table.getStartKeys();
if (startKeys == null || startKeys.length == 0)
if (table == null)
{ throw new IOException("No table was provided."); }...
}
Should check if the table is null before calling a method on it.
Admittedly, this isn't the worst bug in the world, it's really just more of a nuisance in that the "No table was provided" message becomes an NPE
This bug is in both
org.apache.hadoop.hbase.mapred.TableInputFormatBase
org.apache.hadoop.hbase.mapreduce.TableInputFormatBase