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 2016/10/18 18:10:41 UTC

hbase git commit: HBASE-16866 Avoid NPE in AsyncRequestFutureImpl#updateStats (ChiaPing Tsai)

Repository: hbase
Updated Branches:
  refs/heads/master bb6cc4d43 -> 6c89c6251


HBASE-16866 Avoid NPE in AsyncRequestFutureImpl#updateStats (ChiaPing Tsai)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/6c89c625
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/6c89c625
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/6c89c625

Branch: refs/heads/master
Commit: 6c89c6251ff611c2f10bfd6f8c9f8a2d717dc71b
Parents: bb6cc4d
Author: tedyu <yu...@gmail.com>
Authored: Tue Oct 18 11:10:33 2016 -0700
Committer: tedyu <yu...@gmail.com>
Committed: Tue Oct 18 11:10:33 2016 -0700

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java  | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/6c89c625/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java
index d48179b..6b6b99a 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncRequestFutureImpl.java
@@ -977,6 +977,11 @@ class AsyncRequestFutureImpl<CResult> implements AsyncRequestFuture {
     for (Map.Entry<byte[], MultiResponse.RegionResult> regionStats : results.entrySet()) {
       byte[] regionName = regionStats.getKey();
       ClientProtos.RegionLoadStats stat = regionStats.getValue().getStat();
+      if (stat == null) {
+        LOG.error("No ClientProtos.RegionLoadStats found for server=" + server
+          + ", region=" + Bytes.toStringBinary(regionName));
+        continue;
+      }
       RegionLoadStats regionLoadstats = ProtobufUtil.createRegionLoadStats(stat);
       ResultStatsUtil.updateStats(asyncProcess.connection.getStatisticsTracker(), server,
           regionName, regionLoadstats);