001package org.apache.hadoop.hdfs.server.datanode;
002
003import javax.servlet.*;
004import javax.servlet.http.*;
005import javax.servlet.jsp.*;
006import org.apache.hadoop.hdfs.tools.GetConf;
007import org.apache.hadoop.hdfs.server.datanode.DatanodeJspHelper;
008import org.apache.hadoop.hdfs.server.datanode.DataNode;
009import org.apache.hadoop.util.ServletUtil;
010
011public final class dataNodeHome_jsp extends org.apache.jasper.runtime.HttpJspBase
012    implements org.apache.jasper.runtime.JspSourceDependent {
013
014
015  //for java.io.Serializable
016  private static final long serialVersionUID = 1L;
017
018  private static java.util.List _jspx_dependants;
019
020  public Object getDependants() {
021    return _jspx_dependants;
022  }
023
024  public void _jspService(HttpServletRequest request, HttpServletResponse response)
025        throws java.io.IOException, ServletException {
026
027    JspFactory _jspxFactory = null;
028    PageContext pageContext = null;
029    HttpSession session = null;
030    ServletContext application = null;
031    ServletConfig config = null;
032    JspWriter out = null;
033    Object page = this;
034    JspWriter _jspx_out = null;
035    PageContext _jspx_page_context = null;
036
037
038    try {
039      _jspxFactory = JspFactory.getDefaultFactory();
040      response.setContentType("text/html; charset=UTF-8");
041      pageContext = _jspxFactory.getPageContext(this, request, response,
042                        null, true, 8192, true);
043      _jspx_page_context = pageContext;
044      application = pageContext.getServletContext();
045      config = pageContext.getServletConfig();
046      session = pageContext.getSession();
047      out = pageContext.getOut();
048      _jspx_out = out;
049
050
051/*
052 * Licensed to the Apache Software Foundation (ASF) under one
053 * or more contributor license agreements.  See the NOTICE file 
054 * distributed with this work for additional information
055 * regarding copyright ownership.  The ASF licenses this file
056 * to you under the Apache License, Version 2.0 (the
057 * "License"); you may not use this file except in compliance
058 * with the License.  You may obtain a copy of the License at
059 *
060 *     http://www.apache.org/licenses/LICENSE-2.0
061 *
062 * Unless required by applicable law or agreed to in writing, software
063 * distributed under the License is distributed on an "AS IS" BASIS,
064 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
065 * See the License for the specific language governing permissions and
066 * limitations under the License.
067 */
068
069  
070  DataNode dataNode = (DataNode)getServletContext().getAttribute("datanode"); 
071  String state = dataNode.isDatanodeUp()?"active":"inactive";
072  String dataNodeLabel = dataNode.getDisplayName();
073
074      out.write("<!DOCTYPE html>\n<html>\n<head>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/static/hadoop.css\">\n<title>Hadoop DataNode&nbsp;");
075      out.print(dataNodeLabel);
076      out.write("</title>\n</head>    \n<body>\n<h1>DataNode '");
077      out.print(dataNodeLabel);
078      out.write('\'');
079      out.write(' ');
080      out.write('(');
081      out.print(state);
082      out.write(")</h1>\n");
083      out.print( DatanodeJspHelper.getVersionTable(getServletContext()) );
084      out.write("<br />\n<b><a href=\"/logs/\">DataNode Logs</a></b>\n<br />\n<b><a href=\"/logLevel\">View/Set Log Level</a></b>\n<br />\n<b><a href=\"/metrics\">Metrics</a></b>\n<br />\n<b><a href=\"/conf\">Configuration</a></b>\n<br />\n<b><a href=\"/blockScannerReport\">Block Scanner Report</a></b>\n");
085
086out.println(ServletUtil.htmlFooter());
087
088    } catch (Throwable t) {
089      if (!(t instanceof SkipPageException)){
090        out = _jspx_out;
091        if (out != null && out.getBufferSize() != 0)
092          out.clearBuffer();
093        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
094      }
095    } finally {
096      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
097    }
098  }
099}