org.apache.hadoop.hbase.generated.master.operationDetails_jsp Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hbase-server Show documentation
Show all versions of hbase-server Show documentation
Server functionality for HBase
package org.apache.hadoop.hbase.generated.master;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
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.master.HMaster;
import org.apache.hadoop.util.StringUtils;
import org.apache.hadoop.hbase.client.ServerType;
import org.apache.hadoop.hbase.client.LogEntry;
import org.apache.hadoop.hbase.client.BalancerRejection;
import org.apache.hadoop.hbase.client.BalancerDecision;
public final class operationDetails_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();
private static java.util.List _jspx_dependants;
private org.glassfish.jsp.api.ResourceInjector _jspx_resourceInjector;
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
response.setContentType("text/html;charset=UTF-8");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
_jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector");
out.write('\n');
out.write('\n');
HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER);
Configuration conf = master.getConfiguration();
List logList = null;
List decisionList = null;
if(master.isInitialized()) {
try (Admin admin = master.getConnection().getAdmin()) {
logList = (List)(List)admin.getLogEntries(null, "BALANCER_REJECTION", ServerType.MASTER, 250, null);
decisionList = (List)(List)admin.getLogEntries(null, "BALANCER_DECISION", ServerType.MASTER, 250, null);
}
}
out.write('\n');
out.write('\n');
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "header.jsp" + "?" + org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode("pageTitle", request.getCharacterEncoding())+ "=" + org.apache.jasper.runtime.JspRuntimeLibrary.URLEncode((java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${pageTitle}", java.lang.String.class, (PageContext)_jspx_page_context, null), request.getCharacterEncoding()), out, false);
out.write("\n\n\n\n \n \n Operations Details
\n HBase uses some fixed-size ring buffers to maintain rolling window history of specific server-side operation details.\n This page list all operation details retrieve from these ring buffers
\n \n \n\n \n - \n Balancer Rejection \n
\n - \n Balancer Decision \n
\n
\n \n \n Balancer Rejection explain why balancer is skipping runs and explain all factors considered
\n \n \n Reason \n CostFunctions Details \n \n");
out.write(" ");
if (logList == null) {
out.write("\n ");
} else {
out.write("\n ");
for (BalancerRejection entry: logList) {
out.write("\n \n ");
out.print(entry.getReason());
out.write(" \n \n ");
List costFunctions = entry.getCostFuncInfoList();
if (costFunctions != null && !costFunctions.isEmpty()) {
out.write("\n \n ");
for (String costFunctionInfo: entry.getCostFuncInfoList() ) {
out.write("\n ");
out.print( costFunctionInfo );
out.write(" \n ");
}
out.write("\n
\n ");
}
out.write("\n \n \n ");
}
out.write("\n ");
}
out.write("\n
\n \n \n Balancer Decision displayed the history of decision(factor details and weights and costs) made by LoadBalancers
\n \n \n Initial Function Costs \n Final Function Costs \n Init Total Cost \n Computed Total Cost \n Computed Steps \n Region Plans \n \n ");
if (decisionList == null) {
out.write("\n ");
} else {
out.write("\n ");
for (BalancerDecision decision: decisionList) {
out.write("\n \n ");
out.print(decision.getInitialFunctionCosts());
out.write(" \n ");
out.print(decision.getFinalFunctionCosts());
out.write(" \n ");
out.print(StringUtils.format("%.2f", decision.getInitTotalCost()));
out.write(" \n ");
out.print(StringUtils.format("%.2f", decision.getComputedTotalCost()));
out.write(" \n ");
out.print(decision.getComputedSteps());
out.write(" \n ");
List regionPlans = decision.getRegionPlans();
if ( regionPlans == null) {
out.write("\n \n ");
} else {
out.write("\n \n \n ");
for (String plan : regionPlans) {
out.write("\n ");
out.print(plan);
out.write(" \n ");
}
out.write("\n
\n \n ");
}
out.write("\n \n ");
}
out.write("\n ");
}
out.write("\n \n \n \n\n");
org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "footer.jsp", out, false);
out.write('\n');
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
else throw new ServletException(t);
}
} finally {
_jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy