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 731004129cc..3e049cc5da2 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 @@ -153,6 +153,7 @@ AssignmentManager assignmentManager = master.getAssignmentManager(); <%if master.isActiveMaster() %>
  • Procedures & Locks
  • HBCK Report
  • +
  • Named Queue Logs
  • <%if master.getConfiguration().getBoolean(QuotaUtil.QUOTA_CONF_KEY, false) %>
  • Quotas
  • diff --git a/hbase-server/src/main/resources/hbase-webapps/master/header.jsp b/hbase-server/src/main/resources/hbase-webapps/master/header.jsp index 98efdf0c557..58d834ebb9b 100644 --- a/hbase-server/src/main/resources/hbase-webapps/master/header.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/master/header.jsp @@ -21,6 +21,7 @@ import="org.apache.hadoop.hbase.master.HMaster" import="org.apache.hadoop.hbase.quotas.QuotaUtil" import="org.apache.hadoop.hbase.HBaseConfiguration" + import="org.apache.hadoop.hbase.master.balancer.BaseLoadBalancer" %> <% HMaster master = (HMaster) getServletContext().getAttribute(HMaster.MASTER); @@ -60,6 +61,9 @@ <% if (master.isActiveMaster()){ %>
  • Procedures & Locks
  • HBCK Report
  • + <% if (master.getConfiguration().getBoolean(BaseLoadBalancer.BALANCER_REJECTION_BUFFER_ENABLED, false)) { %> +
  • Named Queue Logs
  • + <% }%> <% if (master.getConfiguration().getBoolean(QuotaUtil.QUOTA_CONF_KEY, false)) { %>
  • Quotas
  • <% }%> diff --git a/hbase-server/src/main/resources/hbase-webapps/master/namedQueueLog.jsp b/hbase-server/src/main/resources/hbase-webapps/master/namedQueueLog.jsp new file mode 100644 index 00000000000..c0145d8f664 --- /dev/null +++ b/hbase-server/src/main/resources/hbase-webapps/master/namedQueueLog.jsp @@ -0,0 +1,95 @@ +<%-- +/** + * 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. + */ +--%> +<%@ page contentType="text/html;charset=UTF-8" + import="java.util.Date" + import="java.util.List" + import="org.apache.hadoop.conf.Configuration" + import="org.apache.hadoop.hbase.client.Admin" + import="org.apache.hadoop.hbase.client.SnapshotDescription" + import="org.apache.hadoop.hbase.http.InfoServer" + import="org.apache.hadoop.hbase.master.HMaster" + import="org.apache.hadoop.hbase.snapshot.SnapshotInfo" + import="org.apache.hadoop.util.StringUtils" + import="org.apache.hadoop.hbase.TableName" + import="org.apache.hadoop.hbase.client.ServerType" + import="org.apache.hadoop.hbase.client.LogEntry" + import="org.apache.hadoop.hbase.client.BalancerRejection" +%> +<% + HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER); + Configuration conf = master.getConfiguration(); + + List logList = null; + + if(master.isInitialized()) { + try (Admin admin = master.getConnection().getAdmin()) { + logList = (List)(List)admin.getLogEntries(null, "BALANCER_REJECTION", ServerType.MASTER, 250, null); + } + } +%> + + + + + + +
    +
    + +
    +
    + +
    +
    + + + + + + <% if (logList == null) { %> + <% } else { %> + <% for (BalancerRejection entry: logList) { %> + + + + + <% } %> + <% } %> +
    ReasonCostFunctions Details
    <%=entry.getReason()%> + <% List costFunctions = entry.getCostFuncInfoList(); + if (costFunctions != null && !costFunctions.isEmpty()) { %> + + <% for (String costFunctionInfo: entry.getCostFuncInfoList() ) { %> + + <% }%> +
    <%= costFunctionInfo %>
    + <% } %> +
    +
    +
    +
    +
    +