You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by li...@apache.org on 2013/03/21 19:53:58 UTC
svn commit: r1459471 -
/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Author: liyin
Date: Thu Mar 21 18:53:57 2013
New Revision: 1459471
URL: http://svn.apache.org/r1459471
Log:
[HBASE-8082] Fixing NullPointerException in org.apache.hadoop.hbase.regionserver.HRegion.RegionScanner.nextRows
Author: manukranthk
Summary:
On occurance of IOException in the scanprefetch call,
the function should throw the exception instead of proceeding.
Test Plan: Unit tests on MR
Reviewers: liyintang, kranganathan, rshroff
Reviewed By: liyintang
CC: hbase-eng@
Differential Revision: https://phabricator.fb.com/D735284
Modified:
hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1459471&r1=1459470&r2=1459471&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java Thu Mar 21 18:53:57 2013
@@ -3212,6 +3212,10 @@ public class HRegion implements HeapSize
scanResult = scanFetch.call();
}
+ if (scanResult.isException) {
+ throw scanResult.ioException;
+ }
+
// schedule a background prefetch for the next result if prefetch is
// enabled on scans
boolean scanDone =
@@ -3220,9 +3224,11 @@ public class HRegion implements HeapSize
ScanPrefetcher callable = new ScanPrefetcher(nbRows, limit, metric);
prefetchScanFuture = HRegionServer.scanPrefetchThreadPool.submit(callable);
}
- rowReadCnt.addAndGet(scanResult.outResults.length);
+ if (!scanDone) {
+ rowReadCnt.addAndGet(scanResult.outResults.length);
+ }
return scanResult.outResults == null ||
- (isFilterDone() && scanResult.outResults.length == 0) ?
+ (isFilterDone() && scanResult.outResults.length == 0) ?
null : scanResult.outResults;
}