This is an automated email from the ASF dual-hosted git repository.
apurtell pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new d532135a26 HBASE-27068 NPE occurs when the active master has not yet
been elected (#4474)
d532135a26 is described below
commit d532135a261c8a85b9a2f543d93238dead1d5f65
Author: litao <[email protected]>
AuthorDate: Wed Jun 1 02:49:49 2022 +0800
HBASE-27068 NPE occurs when the active master has not yet been elected
(#4474)
Signed-off-by: Pankaj Kumar <[email protected]>
Signed-off-by: Viraj Jasani<[email protected]
---
.../org/apache/hadoop/hbase/tmpl/master/BackupMasterStatusTmpl.jamon | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/BackupMasterStatusTmpl.jamon
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/BackupMasterStatusTmpl.jamon
index 190f1dd857..21af264bbe 100644
---
a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/BackupMasterStatusTmpl.jamon
+++
b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/BackupMasterStatusTmpl.jamon
@@ -24,12 +24,13 @@ java.util.*;
org.apache.hadoop.hbase.ServerName;
org.apache.hadoop.hbase.ClusterMetrics;
org.apache.hadoop.hbase.master.HMaster;
+org.apache.hbase.thirdparty.com.google.common.base.Preconditions;
</%import>
<%if (!master.isActiveMaster()) %>
<%java>
ServerName active_master = master.getActiveMaster().orElse(null);
- assert active_master != null : "Failed to retrieve active master's
ServerName!";
- int activeInfoPort = active_master == null ? 0 :
master.getActiveMasterInfoPort();
+ Preconditions.checkState(active_master != null, "Failed to retrieve active
master's ServerName!");
+ int activeInfoPort = master.getActiveMasterInfoPort();
</%java>
<div class="row inner_header">
<div class="page-header">