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 a61fb7164cd..57227b2a9b2 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,7 +153,7 @@ AssignmentManager assignmentManager = master.getAssignmentManager(); <%if master.isActiveMaster() %>
  • Procedures & Locks
  • HBCK Report
  • -
  • Named Queue Logs
  • +
  • Operation Details
  • <%if master.getConfiguration().getBoolean(QuotaUtil.QUOTA_CONF_KEY, false) %>
  • Quotas
  • diff --git a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon index 388357d6eb0..2068c760799 100644 --- a/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon +++ b/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon @@ -111,6 +111,7 @@ org.apache.hadoop.hbase.zookeeper.MasterAddressTracker;
  • Home
  • Process Metrics
  • Local Logs
  • +
  • Operation Details
  • Log Level
  • Debug Dump
  • Metrics Dump
  • 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 f5069c34877..3da82c95c75 100644 --- a/hbase-server/src/main/resources/hbase-webapps/master/header.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/master/header.jsp @@ -60,7 +60,7 @@ <% if (master.isActiveMaster()){ %>
  • Procedures & Locks
  • HBCK Report
  • -
  • Named Queue Logs
  • +
  • Operation Details
  • <% 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/operationDetails.jsp similarity index 91% rename from hbase-server/src/main/resources/hbase-webapps/master/namedQueueLog.jsp rename to hbase-server/src/main/resources/hbase-webapps/master/operationDetails.jsp index dc1e599b1b8..e6049558b28 100644 --- a/hbase-server/src/main/resources/hbase-webapps/master/namedQueueLog.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/master/operationDetails.jsp @@ -22,12 +22,8 @@ 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" @@ -55,7 +51,9 @@
    @@ -69,6 +67,7 @@
    +

    Balancer Rejection explain why balancer is skipping runs and explain all factors considered

    @@ -95,6 +94,7 @@
    Reason
    +

    Balancer Decision displayed the history of decision(factor details and weights and costs) made by LoadBalancers

    diff --git a/hbase-server/src/main/resources/hbase-webapps/regionserver/header.jsp b/hbase-server/src/main/resources/hbase-webapps/regionserver/header.jsp index 88ca5154add..edbecc424c6 100644 --- a/hbase-server/src/main/resources/hbase-webapps/regionserver/header.jsp +++ b/hbase-server/src/main/resources/hbase-webapps/regionserver/header.jsp @@ -53,6 +53,7 @@
  • Home
  • Process Metrics
  • Local Logs
  • +
  • Operation Details
  • Log Level
  • Debug Dump
  • Metrics Dump
  • diff --git a/hbase-server/src/main/resources/hbase-webapps/regionserver/rsOperationDetails.jsp b/hbase-server/src/main/resources/hbase-webapps/regionserver/rsOperationDetails.jsp new file mode 100644 index 00000000000..b606ae40f8a --- /dev/null +++ b/hbase-server/src/main/resources/hbase-webapps/regionserver/rsOperationDetails.jsp @@ -0,0 +1,176 @@ +<%-- +/** + * 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="java.util.Collections" + import="org.apache.hadoop.conf.Configuration" + import="org.apache.hadoop.util.StringUtils" + import="org.apache.hadoop.hbase.regionserver.HRegionServer" + import="org.apache.hadoop.hbase.HConstants" + import="org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog" + import="org.apache.hadoop.hbase.namequeues.NamedQueueRecorder" + import="org.apache.hadoop.hbase.namequeues.RpcLogDetails" + import="org.apache.hadoop.hbase.namequeues.request.NamedQueueGetRequest" + import="org.apache.hadoop.hbase.namequeues.response.NamedQueueGetResponse" + import="org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SlowLogResponseRequest" + import="org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.SlowLogResponseRequest.LogType" +%> +<% + HRegionServer rs = (HRegionServer) getServletContext().getAttribute(HRegionServer.REGIONSERVER); + List slowLogs = Collections.emptyList(); + List largeLogs = Collections.emptyList(); + Configuration conf = rs.getConfiguration(); + boolean isSlowLogEnabled = conf.getBoolean(HConstants.SLOW_LOG_BUFFER_ENABLED_KEY, false); + + if(rs.isOnline() && isSlowLogEnabled) { + NamedQueueRecorder namedQueueRecorder = rs.getNamedQueueRecorder(); + + NamedQueueGetRequest slowRequest = new NamedQueueGetRequest(); + slowRequest.setNamedQueueEvent(RpcLogDetails.SLOW_LOG_EVENT); + slowRequest.setSlowLogResponseRequest(SlowLogResponseRequest.newBuilder() + .setLogType(LogType.SLOW_LOG) + .setLimit(Integer.MAX_VALUE) + .build()); + NamedQueueGetResponse slowResponse = + namedQueueRecorder.getNamedQueueRecords(slowRequest); + slowLogs = slowResponse.getSlowLogPayloads(); + + + NamedQueueGetRequest largeRequest = new NamedQueueGetRequest(); + largeRequest.setNamedQueueEvent(RpcLogDetails.SLOW_LOG_EVENT); + largeRequest.setSlowLogResponseRequest(SlowLogResponseRequest.newBuilder() + .setLogType(LogType.LARGE_LOG) + .setLimit(Integer.MAX_VALUE) + .build()); + NamedQueueGetResponse largeResponse = + namedQueueRecorder.getNamedQueueRecords(largeRequest); + largeLogs = largeResponse.getSlowLogPayloads(); + } +%> + + + + + + +
    +
    + +
    +
    + +
    +
    +

    Slow RPCs record those RPCs whose processing time is greater than the threshold (see the setting 'hbase.ipc.warn.response.time' for details)

    +
    Initial Function Costs
    + + + + + + + + + + + + + + + + + <% if (slowLogs != null && !slowLogs.isEmpty()) {%> + <% for (TooSlowLog.SlowLogPayload r : slowLogs) { %> + + + + + + + + + + + + + + + + + <% } %> + <% } %> +
    Start TimeProcessing TimeQueue TimeResponse SizeClient AddressServer ClassMethod NameRegion NameUser NameMultiGets CountMultiMutations CountMultiService CallsCall DetailsParam
    <%=new Date(r.getStartTime() + 1800*1000)%><%=r.getProcessingTime()%>ms<%=r.getQueueTime()%>ms<%=StringUtils.byteDesc(r.getResponseSize())%><%=r.getClientAddress()%><%=r.getServerClass()%><%=r.getMethodName()%><%=r.getRegionName()%><%=r.getUserName()%><%=r.getMultiGets()%><%=r.getMultiMutations()%><%=r.getMultiServiceCalls()%><%=r.getCallDetails()%><%=r.getParam()%>
    +
    +
    +

    Large response RPCs record those RPCs whose returned data size is greater than the threshold (see the setting'hbase.ipc.warn.response.size' for details)

    + + + + + + + + + + + + + + + + + + <% if (largeLogs != null && !largeLogs.isEmpty()) {%> + <% for (TooSlowLog.SlowLogPayload r : largeLogs) { %> + + + + + + + + + + + + + + + + + <% } %> + <% } %> +
    Start TimeProcessing TimeQueue TimeResponse SizeClient AddressServer ClassMethod NameRegion NameUser NameMultiGets CountMultiMutations CountMultiService CallsCall DetailsParam
    <%=new Date(r.getStartTime() + 1800*1000)%><%=r.getProcessingTime()%>ms<%=r.getQueueTime()%>ms<%=StringUtils.byteDesc(r.getResponseSize())%><%=r.getClientAddress()%><%=r.getServerClass()%><%=r.getMethodName()%><%=r.getRegionName()%><%=r.getUserName()%><%=r.getMultiGets()%><%=r.getMultiMutations()%><%=r.getMultiServiceCalls()%><%=r.getCallDetails()%><%=r.getParam()%>
    +
    +
    +
    +