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.util.*; 7 import org.apache.hadoop.util.StringUtils; 8 import org.apache.hadoop.conf.Configuration; 9 import org.apache.hadoop.hbase.master.HMaster; 10 import org.apache.hadoop.hbase.client.HBaseAdmin; 11 import org.apache.hadoop.hbase.HTableDescriptor; 12 13 public final class tablesDetailed_jsp extends org.apache.jasper.runtime.HttpJspBase 14 implements org.apache.jasper.runtime.JspSourceDependent { 15 16 private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory(); 17 18 private static java.util.Vector _jspx_dependants; 19 20 private org.apache.jasper.runtime.ResourceInjector _jspx_resourceInjector; 21 22 public Object getDependants() { 23 return _jspx_dependants; 24 } 25 26 public void _jspService(HttpServletRequest request, HttpServletResponse response) 27 throws java.io.IOException, ServletException { 28 29 PageContext pageContext = null; 30 HttpSession session = null; 31 ServletContext application = null; 32 ServletConfig config = null; 33 JspWriter out = null; 34 Object page = this; 35 JspWriter _jspx_out = null; 36 PageContext _jspx_page_context = null; 37 38 try { 39 response.setContentType("text/html;charset=UTF-8"); 40 pageContext = _jspxFactory.getPageContext(this, request, response, 41 null, true, 8192, true); 42 _jspx_page_context = pageContext; 43 application = pageContext.getServletContext(); 44 config = pageContext.getServletConfig(); 45 session = pageContext.getSession(); 46 out = pageContext.getOut(); 47 _jspx_out = out; 48 _jspx_resourceInjector = (org.apache.jasper.runtime.ResourceInjector) application.getAttribute("com.sun.appserv.jsp.resource.injector"); 49 50 out.write('\n'); 51 52 HMaster master = (HMaster)getServletContext().getAttribute(HMaster.MASTER); 53 Configuration conf = master.getConfiguration(); 54 55 out.write("\n<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!-- Commenting out DOCTYPE so our blue outline shows on hadoop 0.20.205.0, etc.\n See tail of HBASE-2110 for explaination.\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n-->\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\"/>\n<title>HBase Master: "); 56 out.print( master.getServerName()); 57 out.write("%></title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/static/hbase.css\" />\n</head>\n<body>\n\n<h2>User Tables</h2>\n"); 58 HTableDescriptor[] tables = new HBaseAdmin(conf).listTables(); 59 if(tables != null && tables.length > 0) { 60 out.write("\n<table>\n<tr>\n <th>Table</th>\n <th>Description</th>\n</tr>\n"); 61 for(HTableDescriptor htDesc : tables ) { 62 out.write("\n<tr>\n <td>"); 63 out.print( htDesc.getNameAsString() ); 64 out.write("</td>\n <td>"); 65 out.print( htDesc.toString() ); 66 out.write("</td>\n</tr>\n"); 67 } 68 out.write("\n\n<p> "); 69 out.print( tables.length ); 70 out.write(" table(s) in set.</p>\n</table>\n"); 71 } 72 out.write("\n</body>\n</html>\n"); 73 } catch (Throwable t) { 74 if (!(t instanceof SkipPageException)){ 75 out = _jspx_out; 76 if (out != null && out.getBufferSize() != 0) 77 out.clearBuffer(); 78 if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); 79 } 80 } finally { 81 _jspxFactory.releasePageContext(_jspx_page_context); 82 } 83 } 84 }