All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hbase-webapps.regionserver.rsOperationDetails.jsp Maven / Gradle / Ivy

There is a newer version: 3.0.0-beta-1
Show newest version
<%--
/**
 * 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)

<% if (slowLogs != null && !slowLogs.isEmpty()) {%> <% for (TooSlowLog.SlowLogPayload r : slowLogs) { %> <% } %> <% } %>
Start Time Processing Time Queue Time Response Size Block Bytes Scanned Client Address Server Class Method Name Region Name User Name MultiGets Count MultiMutations Count MultiService Calls Call Details Param
<%=new Date(r.getStartTime() + 1800*1000)%> <%=r.getProcessingTime()%>ms <%=r.getQueueTime()%>ms <%=StringUtils.byteDesc(r.getResponseSize())%> <%=StringUtils.byteDesc(r.getBlockBytesScanned())%> <%=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 Time Processing Time Queue Time Response Size Block Bytes Scanned Client Address Server Class Method Name Region Name User Name MultiGets Count MultiMutations Count MultiService Calls Call Details Param
<%=new Date(r.getStartTime() + 1800*1000)%> <%=r.getProcessingTime()%>ms <%=r.getQueueTime()%>ms <%=StringUtils.byteDesc(r.getResponseSize())%> <%=StringUtils.byteDesc(r.getBlockBytesScanned())%> <%=r.getClientAddress()%> <%=r.getServerClass()%> <%=r.getMethodName()%> <%=r.getRegionName()%> <%=r.getUserName()%> <%=r.getMultiGets()%> <%=r.getMultiMutations()%> <%=r.getMultiServiceCalls()%> <%=r.getCallDetails()%> <%=r.getParam()%>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy