001package org.apache.hadoop.hdfs.server.namenode; 002 003import javax.servlet.*; 004import javax.servlet.http.*; 005import javax.servlet.jsp.*; 006import org.apache.hadoop.util.ServletUtil; 007import org.apache.hadoop.hdfs.server.namenode.ClusterJspHelper.DecommissionStatus; 008import java.util.List; 009import org.znerd.xmlenc.*; 010 011public final class decommission_jsp extends org.apache.jasper.runtime.HttpJspBase 012 implements org.apache.jasper.runtime.JspSourceDependent { 013 014 015/* 016 * Licensed to the Apache Software Foundation (ASF) under one 017 * or more contributor license agreements. See the NOTICE file 018 * distributed with this work for additional information 019 * regarding copyright ownership. The ASF licenses this file 020 * to you under the Apache License, Version 2.0 (the 021 * "License"); you may not use this file except in compliance 022 * with the License. You may obtain a copy of the License at 023 * 024 * http://www.apache.org/licenses/LICENSE-2.0 025 * 026 * Unless required by applicable law or agreed to in writing, software 027 * distributed under the License is distributed on an "AS IS" BASIS, 028 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 029 * See the License for the specific language governing permissions and 030 * limitations under the License. 031 */ 032 033 034 //for java.io.Serializable 035 private static final long serialVersionUID = 1L; 036 037 private static java.util.List _jspx_dependants; 038 039 public Object getDependants() { 040 return _jspx_dependants; 041 } 042 043 public void _jspService(HttpServletRequest request, HttpServletResponse response) 044 throws java.io.IOException, ServletException { 045 046 JspFactory _jspxFactory = null; 047 PageContext pageContext = null; 048 HttpSession session = null; 049 ServletContext application = null; 050 ServletConfig config = null; 051 JspWriter out = null; 052 Object page = this; 053 JspWriter _jspx_out = null; 054 PageContext _jspx_page_context = null; 055 056 057 try { 058 _jspxFactory = JspFactory.getDefaultFactory(); 059 response.setContentType("application/xml"); 060 pageContext = _jspxFactory.getPageContext(this, request, response, 061 null, true, 8192, true); 062 _jspx_page_context = pageContext; 063 application = pageContext.getServletContext(); 064 config = pageContext.getServletConfig(); 065 session = pageContext.getSession(); 066 out = pageContext.getOut(); 067 _jspx_out = out; 068 069 out.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<?xml-stylesheet type=\"text/xsl\" href=\"decommission.xsl\"?>\n"); 070 071 /** 072 * This JSP page provides decomission nodes information cross cluster. 073 * It lists the date nodes with their decommission states/progress 074 * reported by each name node. 075 * It eleminates the data nodes who are not in decommission states. 076 */ 077 final ClusterJspHelper clusterhealthjsp = new ClusterJspHelper(); 078 DecommissionStatus dInfo = clusterhealthjsp.generateDecommissioningReport(); 079 XMLOutputter doc = new XMLOutputter(out, "UTF-8"); 080 dInfo.toXML(doc); 081 082 } catch (Throwable t) { 083 if (!(t instanceof SkipPageException)){ 084 out = _jspx_out; 085 if (out != null && out.getBufferSize() != 0) 086 out.clearBuffer(); 087 if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); 088 } 089 } finally { 090 if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context); 091 } 092 } 093}