diff --git a/src/java/org/apache/hadoop/hbase/regionserver/StoreFileScanner.java b/src/java/org/apache/hadoop/hbase/regionserver/StoreFileScanner.java index d8e9ede..cd441b4 100644 --- a/src/java/org/apache/hadoop/hbase/regionserver/StoreFileScanner.java +++ b/src/java/org/apache/hadoop/hbase/regionserver/StoreFileScanner.java @@ -53,10 +53,12 @@ class StoreFileScanner implements KeyValueScanner { KeyValue retKey = cur; cur = hfs.getKeyValue(); try { - hfs.next(); + // only seek if we arent at the end. cur == null implies 'end'. + if (cur != null) + hfs.next(); } catch(IOException e) { - // Only occurs if the scanner is not seeked, this is never the case - // as we seek immediately after construction in StoreScanner + // Turn checked exception into runtime exception. + throw new RuntimeException(e); } return retKey; }