NPE getting scanner

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@647953 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jim Kellerman 2008-04-14 19:27:17 +00:00
parent fd202765c9
commit 278bd7e772
2 changed files with 14 additions and 0 deletions

View File

@ -1,6 +1,7 @@
Hbase Change Log Hbase Change Log
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES
HBASE-521 Improve client scanner interface HBASE-521 Improve client scanner interface
HBASE-577 NPE getting scanner
BUG FIXES BUG FIXES
HBASE-550 EOF trying to read reconstruction log stops region deployment HBASE-550 EOF trying to read reconstruction log stops region deployment

View File

@ -1114,6 +1114,19 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
final long timestamp, final RowFilterInterface filter) final long timestamp, final RowFilterInterface filter)
throws IOException { throws IOException {
checkOpen(); checkOpen();
NullPointerException npe = null;
if (regionName == null) {
npe = new NullPointerException("regionName is null");
} else if (cols == null) {
npe = new NullPointerException("columns to scan is null");
} else if (firstRow == null) {
npe = new NullPointerException("firstRow for scanner is null");
}
if (npe != null) {
IOException io = new IOException("Invalid arguments to openScanner");
io.initCause(npe);
throw io;
}
requestCount.incrementAndGet(); requestCount.incrementAndGet();
try { try {
HRegion r = getRegion(regionName); HRegion r = getRegion(regionName);