1 package org.apache.hadoop.hbase.generated.master; 2 3 import javax.servlet.*; 4 import javax.servlet.http.*; 5 import javax.servlet.jsp.*; 6 import java.io.IOException; 7 import org.apache.hadoop.conf.Configuration; 8 import org.apache.hadoop.hbase.client.HBaseAdmin; 9 import org.apache.hadoop.hbase.client.HConnection; 10 import org.apache.hadoop.hbase.client.HConnectionManager; 11 import org.apache.hadoop.hbase.HRegionInfo; 12 import org.apache.hadoop.hbase.zookeeper.ZKUtil; 13 import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher; 14 import org.apache.hadoop.hbase.HBaseConfiguration; 15 import org.apache.hadoop.hbase.master.HMaster; 16 import org.apache.hadoop.hbase.HConstants; 17 18 public final class zk_jsp extends org.apache.jasper.runtime.HttpJspBase 19 implements org.apache.jasper.runtime.JspSourceDependent { 20 21 private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory(); 22 23 private static java.util.Vector _jspx_dependants; 24 25 private org.apache.jasper.runtime.ResourceInjector _jspx_resourceInjector; 26 27 public Object getDependants() { 28 return _jspx_dependants; 29 } 30 31 public void _jspService(HttpServletRequest request, HttpServletResponse response) 32 throws java.io.IOException, ServletException { 33 34 PageContext pageContext = null; 35 HttpSession session = null; 36 ServletContext application = null; 37 ServletConfig config = null; 38 JspWriter out = null; 39 Object page = this; 40 JspWriter _jspx_out = null; 41 PageContext _jspx_page_context = null; 42 43 try { 44 response.setContentType("text/html;charset=UTF-8"); 45 pageContext = _jspxFactory.getPageContext(this, request, response, 46 null, true, 8192, true); 47 _jspx_page_context = pageContext; 48 application = pageContext.getServletContext(); 49 config = pageContext.getServletConfig(); 50 session = pageContext.getSession(); 51 out = pageContext.getOut(); 52 _jspx_out = out; 53 _jspx_resourceInjector = (org.apache.jasper.runtime.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); 54 55 56 HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER); 57 Configuration conf = master.getConfiguration(); 58 HBaseAdmin hbadmin = new HBaseAdmin(conf); 59 HConnection connection = hbadmin.getConnection(); 60 ZooKeeperWatcher watcher = connection.getZooKeeperWatcher(); 61 62 out.write("\n\n<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> \n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\"/>\n<title>ZooKeeper Dump</title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/static/hbase.css\" />\n</head>\n<body>\n<a id=\"logo\" href=\"http://hbase.org\"><img src=\"/static/hbase_logo_med.gif\" alt=\"HBase Logo\" title=\"HBase Logo\" /></a>\n<h1 id=\"page_title\">ZooKeeper Dump</h1>\n<p id=\"links_menu\"><a href=\"/master.jsp\">Master</a>, <a href=\"/logs/\">Local logs</a>, <a href=\"/stacks\">Thread Dump</a>, <a href=\"/logLevel\">Log Level</a></p>\n<hr id=\"head_rule\" />\n<pre>\n"); 63 out.print( ZKUtil.dump(watcher) ); 64 out.write('\n'); 65 HConnectionManager.deleteConnection(hbadmin.getConfiguration(), false); 66 out.write("\n</pre>\n\n</body>\n</html>\n"); 67 } catch (Throwable t) { 68 if (!(t instanceof SkipPageException)){ 69 out = _jspx_out; 70 if (out != null && out.getBufferSize() != 0) 71 out.clearBuffer(); 72 if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); 73 } 74 } finally { 75 _jspxFactory.releasePageContext(_jspx_page_context); 76 } 77 } 78 }