diff --git hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/BackupMasterListTmpl.jamon hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/BackupMasterListTmpl.jamon new file mode 100644 index 0000000..64660d2 --- /dev/null +++ hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/BackupMasterListTmpl.jamon @@ -0,0 +1,69 @@ +<%doc> +Copyright The Apache Software Foundation + +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +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. + + +<%args> +HMaster master; + + +<%import> + java.util.*; + org.apache.hadoop.util.StringUtils; + org.apache.hadoop.hbase.util.Bytes; + org.apache.hadoop.hbase.master.HMaster; + org.apache.hadoop.hbase.HConstants; + org.apache.hadoop.hbase.ServerName; + org.apache.hadoop.hbase.ClusterStatus; + + +<%java> +Collection backupMasters = null; +if (master.isActiveMaster()) { + ClusterStatus status = master.getClusterStatus(); + backupMasters = status.getBackupMasters(); +} + + + +<%if (backupMasters != null && backupMasters.size() > 0)%> + + + + + +<%java> + ServerName [] serverNames = backupMasters.toArray(new ServerName[backupMasters.size()]); + Arrays.sort(serverNames); + for (ServerName serverName: serverNames) { + + + + + + +<%java> + } + + + +
ServerNamePortStart Time
<% serverName.getHostname() %><% serverName.getPort() %><% new Date(serverName.getStartcode()) %>
Total:<% (backupMasters != null) ? backupMasters.size() : 0 %>
+ + + + diff --git hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon index e7fb621..9587af8 100644 --- hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon +++ hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/master/MasterStatusTmpl.jamon @@ -134,6 +134,8 @@ org.apache.hadoop.hbase.HBaseConfiguration; <& deadRegionServers &> +

Backup Masters

+ <& BackupMasterListTmpl; master = master &>

Tables