You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2018/07/16 16:49:34 UTC
hbase git commit: HBASE-20889 PE scan is failing with
NullPointerException
Repository: hbase
Updated Branches:
refs/heads/branch-1.3 830d105ea -> 08f983779
HBASE-20889 PE scan is failing with NullPointerException
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/08f98377
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/08f98377
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/08f98377
Branch: refs/heads/branch-1.3
Commit: 08f9837795164e1603825a382d9bb1cab9c2cb3e
Parents: 830d105
Author: tedyu <yu...@gmail.com>
Authored: Mon Jul 16 09:49:21 2018 -0700
Committer: tedyu <yu...@gmail.com>
Committed: Mon Jul 16 09:49:21 2018 -0700
----------------------------------------------------------------------
.../org/apache/hadoop/hbase/PerformanceEvaluation.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/08f98377/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
index 08c281b..dbc13e6 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
@@ -1527,7 +1527,6 @@ public class PerformanceEvaluation extends Configured implements Tool {
@Override
void testTakedown() throws IOException {
if (this.testScanner != null) {
- updateScanMetrics(scan.getScanMetrics());
this.testScanner.close();
}
super.testTakedown();
@@ -1537,7 +1536,7 @@ public class PerformanceEvaluation extends Configured implements Tool {
@Override
void testRow(final int i) throws IOException {
if (this.testScanner == null) {
- Scan scan = new Scan(format(opts.startRow));
+ scan = new Scan(format(opts.startRow));
for (int family = 0; family < opts.families; family++) {
byte[] familyName = Bytes.toBytes(FAMILY_NAME_BASE + family);
if (opts.addColumns) {
@@ -1556,8 +1555,12 @@ public class PerformanceEvaluation extends Configured implements Tool {
scan.setScanMetricsEnabled(true);
this.testScanner = table.getScanner(scan);
}
- Result r = testScanner.next();
- updateValueSize(r);
+ try {
+ Result r = testScanner.next();
+ updateValueSize(r);
+ } finally {
+ updateScanMetrics(scan.getScanMetrics());
+ }
}
}