diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
index c55013dd67b6..226fd495f0cd 100644
--- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
+++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon
@@ -278,7 +278,7 @@ AssignmentManager assignmentManager = master.getAssignmentManager();
Region Visualizer
- <& RegionVisualizerTmpl &>
+ <& RegionVisualizerTmpl; master = master &>
diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/RegionVisualizerTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/RegionVisualizerTmpl.jamon
index e04a81147c08..b2d204f797a5 100644
--- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/RegionVisualizerTmpl.jamon
+++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/RegionVisualizerTmpl.jamon
@@ -16,6 +16,21 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
%doc>
+<%args>
+HMaster master;
+%args>
+<%import>
+org.apache.hadoop.hbase.master.HMaster;
+org.apache.hadoop.hbase.ServerName;
+org.apache.hbase.thirdparty.com.google.common.base.Preconditions;
+%import>
+
+<%java>
+ServerName active_master = master.getActiveMaster().orElse(null);
+Preconditions.checkState(active_master != null, "Failed to retrieve active master's ServerName!");
+String activeHostname = active_master.getHostname();
+int activeInfoPort = master.getActiveMasterInfoPort();
+%java>
@@ -29,7 +44,7 @@ limitations under the License.
description: 'Total `storefileSize` per Region Server',
data: {
name: 'region_info',
- url: 'http://localhost:16010/api/v1/admin/cluster_metrics/live_servers',
+ url: 'http://<% activeHostname %>:<% activeInfoPort %>/api/v1/admin/cluster_metrics/live_servers',
format: { type: 'json', property: 'data' }
},
transform: [