diff options
Diffstat (limited to 'aarch64/share/hadoop/hdfs/webapps/hdfs')
5 files changed, 541 insertions, 0 deletions
diff --git a/aarch64/share/hadoop/hdfs/webapps/hdfs/WEB-INF/web.xml b/aarch64/share/hadoop/hdfs/webapps/hdfs/WEB-INF/web.xml new file mode 100644 index 0000000..aec1197 --- /dev/null +++ b/aarch64/share/hadoop/hdfs/webapps/hdfs/WEB-INF/web.xml @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. See accompanying LICENSE file. +--> +<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"> + +<!-- +Automatically created by Apache Jakarta Tomcat JspC. +Place this fragment in the web.xml before all icon, display-name, +description, distributable, and context-param elements. +--> + + <servlet> + <servlet-name>org.apache.hadoop.hdfs.server.namenode.block_005finfo_005fxml_jsp</servlet-name> + <servlet-class>org.apache.hadoop.hdfs.server.namenode.block_005finfo_005fxml_jsp</servlet-class> + </servlet> + + <servlet> + <servlet-name>org.apache.hadoop.hdfs.server.namenode.dfsnodelist_jsp</servlet-name> + <servlet-class>org.apache.hadoop.hdfs.server.namenode.dfsnodelist_jsp</servlet-class> + </servlet> + + <servlet> + <servlet-name>org.apache.hadoop.hdfs.server.namenode.dfsclusterhealth_jsp</servlet-name> + <servlet-class>org.apache.hadoop.hdfs.server.namenode.dfsclusterhealth_jsp</servlet-class> + </servlet> + + <servlet> + <servlet-name>org.apache.hadoop.hdfs.server.namenode.dfshealth_jsp</servlet-name> + <servlet-class>org.apache.hadoop.hdfs.server.namenode.dfshealth_jsp</servlet-class> + </servlet> + + <servlet> + <servlet-name>org.apache.hadoop.hdfs.server.namenode.decommission_jsp</servlet-name> + <servlet-class>org.apache.hadoop.hdfs.server.namenode.decommission_jsp</servlet-class> + </servlet> + + <servlet> + <servlet-name>org.apache.hadoop.hdfs.server.namenode.nn_005fbrowsedfscontent_jsp</servlet-name> + <servlet-class>org.apache.hadoop.hdfs.server.namenode.nn_005fbrowsedfscontent_jsp</servlet-class> + </servlet> + + <servlet> + <servlet-name>org.apache.hadoop.hdfs.server.namenode.corrupt_005ffiles_jsp</servlet-name> + <servlet-class>org.apache.hadoop.hdfs.server.namenode.corrupt_005ffiles_jsp</servlet-class> + </servlet> + + <servlet> + <servlet-name>org.apache.hadoop.hdfs.server.namenode.corrupt_005freplicas_005fxml_jsp</servlet-name> + <servlet-class>org.apache.hadoop.hdfs.server.namenode.corrupt_005freplicas_005fxml_jsp</servlet-class> + </servlet> + + <servlet-mapping> + <servlet-name>org.apache.hadoop.hdfs.server.namenode.block_005finfo_005fxml_jsp</servlet-name> + <url-pattern>/block_info_xml.jsp</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>org.apache.hadoop.hdfs.server.namenode.dfsnodelist_jsp</servlet-name> + <url-pattern>/dfsnodelist.jsp</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>org.apache.hadoop.hdfs.server.namenode.dfsclusterhealth_jsp</servlet-name> + <url-pattern>/dfsclusterhealth.jsp</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>org.apache.hadoop.hdfs.server.namenode.dfshealth_jsp</servlet-name> + <url-pattern>/dfshealth.jsp</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>org.apache.hadoop.hdfs.server.namenode.decommission_jsp</servlet-name> + <url-pattern>/decommission.jsp</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>org.apache.hadoop.hdfs.server.namenode.nn_005fbrowsedfscontent_jsp</servlet-name> + <url-pattern>/nn_browsedfscontent.jsp</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>org.apache.hadoop.hdfs.server.namenode.corrupt_005ffiles_jsp</servlet-name> + <url-pattern>/corrupt_files.jsp</url-pattern> + </servlet-mapping> + + <servlet-mapping> + <servlet-name>org.apache.hadoop.hdfs.server.namenode.corrupt_005freplicas_005fxml_jsp</servlet-name> + <url-pattern>/corrupt_replicas_xml.jsp</url-pattern> + </servlet-mapping> + +<!-- +All session-config, mime-mapping, welcome-file-list, error-page, taglib, +resource-ref, security-constraint, login-config, security-role, +env-entry, and ejb-ref elements should follow this fragment. +--> + +</web-app> diff --git a/aarch64/share/hadoop/hdfs/webapps/hdfs/decommission.xsl b/aarch64/share/hadoop/hdfs/webapps/hdfs/decommission.xsl new file mode 100644 index 0000000..dba2a07 --- /dev/null +++ b/aarch64/share/hadoop/hdfs/webapps/hdfs/decommission.xsl @@ -0,0 +1,139 @@ +<!-- +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> + +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + + <xsl:include href="dfsclusterhealth_utils.xsl" /> + + <xsl:output method="html" encoding="UTF-8" /> + + <xsl:template match="/"> + <html> + <head> + <link rel="stylesheet" type="text/css" href="static/hadoop.css" /> + <title> + Hadoop cluster + <xsl:value-of select="cluster/@clusterId" /> + </title> + </head> + <body> + + <h1> + Cluster ' + <xsl:value-of select="cluster/@clusterId" /> + ' + </h1> + + <h2>Decommissioning Status</h2> + + <xsl:if test="count(cluster/decommissioningReport/item)"> + <div id="dfstable"> + <table> + <tbody> + <xsl:for-each select="cluster/decommissioningReport/item"> + <tr class="rowNormal"> + <td id="col1"> + <xsl:value-of select="@label" /> + </td> + <td id="col2">:</td> + <td id="col3"> + <xsl:value-of select="@value" /> + </td> + </tr> + </xsl:for-each> + </tbody> + </table> + </div> + + <br /> + </xsl:if> + + <xsl:if test="count(cluster/datanodes/node)"> + + <div id="dfstable"> + <table border="1" cellpadding="10" cellspacing="0"> + <thead> + <xsl:for-each select="cluster/datanodes/node[1]/item"> + <th> + <xsl:value-of select="@label" /> + </th> + </xsl:for-each> + </thead> + <tbody> + <xsl:for-each select="cluster/datanodes/node"> + <tr> + <xsl:for-each select="item"> + <td> + + <xsl:call-template name="displayValue"> + <xsl:with-param name="value"> + <xsl:value-of select="@value" /> + </xsl:with-param> + <xsl:with-param name="unit"> + <xsl:value-of select="@unit" /> + </xsl:with-param> + <xsl:with-param name="link"> + <xsl:value-of select="@link" /> + + </xsl:with-param> + </xsl:call-template> + </td> + </xsl:for-each> + </tr> + </xsl:for-each> + </tbody> + </table> + </div> + + </xsl:if> + + <xsl:if test="count(cluster/unreportedNamenodes/node)"> + <h2>Unreported Namenodes</h2> + <div id="dfstable"> + <table border="1" cellpadding="10" cellspacing="0"> + <tbody> + <xsl:for-each select="cluster/unreportedNamenodes/node"> + <tr class="rowNormal"> + <td id="col1"> + <xsl:value-of select="@name" /> + </td> + <td id="col2"> + <xsl:value-of select="@exception" /> + </td> + </tr> + </xsl:for-each> + </tbody> + </table> + </div> + </xsl:if> + + <xsl:if test="count(cluster/message/item)"> + <h4>Exception</h4> + <xsl:for-each select="cluster/message/item"> + <xsl:value-of select="@msg" /> + </xsl:for-each> + </xsl:if> + + </body> + </html> + </xsl:template> +</xsl:stylesheet> + diff --git a/aarch64/share/hadoop/hdfs/webapps/hdfs/dfsclusterhealth.xsl b/aarch64/share/hadoop/hdfs/webapps/hdfs/dfsclusterhealth.xsl new file mode 100644 index 0000000..77a15cd --- /dev/null +++ b/aarch64/share/hadoop/hdfs/webapps/hdfs/dfsclusterhealth.xsl @@ -0,0 +1,170 @@ +<!-- +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> + +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + + <xsl:include href="dfsclusterhealth_utils.xsl" /> + + <xsl:output method="html" encoding="UTF-8" /> + + <xsl:template match="/"> + <html> + <head> + <link rel="stylesheet" type="text/css" href="static/hadoop.css" /> + <style type="text/css">th,span {width:8em;}</style> + <title> + Hadoop cluster + <xsl:value-of select="cluster/@clusterId" /> + </title> + </head> + <body> + + <h1> + Cluster ' + <xsl:value-of select="cluster/@clusterId" /> + ' + </h1> + + <h2>Cluster Summary</h2> + <xsl:if test="count(cluster/storage/item)"> + <div id="dfstable"> + <table> + <tbody> + <xsl:for-each select="cluster/storage/item"> + <tr class="rowNormal"> + <td id="col1"> + <xsl:value-of select="@label" /> + </td> + <td id="col2">:</td> + <td id="col3"> + + <xsl:call-template name="displayValue"> + <xsl:with-param name="value"> + <xsl:value-of select="@value" /> + </xsl:with-param> + <xsl:with-param name="unit"> + <xsl:value-of select="@unit" /> + </xsl:with-param> + <xsl:with-param name="link"> + <xsl:value-of select="@link" /> + + </xsl:with-param> + </xsl:call-template> + </td> + </tr> + </xsl:for-each> + </tbody> + </table> + </div> + + <br /> + <hr /> + </xsl:if> + <xsl:if test="count(cluster/namenodes/node)"> + <h2>Namenodes</h2> + + <div id="dfstable"> + <table> + <tbody> + <tr class="rowNormal"> + <td id="col1">Number of namenodes</td> + <td id="col2">:</td> + <td id="col3"> + <xsl:value-of select="count(cluster/namenodes/node)" /> + </td> + </tr> + </tbody> + </table> + </div> + + <br /> + + <div id="dfstable"> + <table border="1" cellpadding="10" cellspacing="0"> + + <thead> + <xsl:for-each select="cluster/namenodes/node[1]/item"> + <th> + <SPAN><xsl:value-of select="@label" /></SPAN> + </th> + </xsl:for-each> + </thead> + + <tbody> + <xsl:for-each select="cluster/namenodes/node"> + <tr> + <xsl:for-each select="item"> + <td> + + <xsl:call-template name="displayValue"> + <xsl:with-param name="value"> + <xsl:value-of select="@value" /> + </xsl:with-param> + <xsl:with-param name="unit"> + <xsl:value-of select="@unit" /> + </xsl:with-param> + <xsl:with-param name="link"> + <xsl:value-of select="@link" /> + + </xsl:with-param> + </xsl:call-template> + </td> + </xsl:for-each> + </tr> + </xsl:for-each> + </tbody> + + </table> + </div> + </xsl:if> + + <xsl:if test="count(cluster/unreportedNamenodes/node)"> + <h2>Unreported Namenodes</h2> + <div id="dfstable"> + <table border="1" cellpadding="10" cellspacing="0"> + <tbody> + <xsl:for-each select="cluster/unreportedNamenodes/node"> + <tr class="rowNormal"> + <td id="col1"> + <xsl:value-of select="@name" /> + </td> + <td id="col2"> + <xsl:value-of select="@exception" /> + </td> + </tr> + </xsl:for-each> + </tbody> + </table> + </div> + </xsl:if> + + <xsl:if test="count(cluster/message/item)"> + <h4>Exception</h4> + <xsl:for-each select="cluster/message/item"> + <xsl:value-of select="@msg" /> + </xsl:for-each> + </xsl:if> + + </body> + </html> + </xsl:template> +</xsl:stylesheet> + diff --git a/aarch64/share/hadoop/hdfs/webapps/hdfs/dfsclusterhealth_utils.xsl b/aarch64/share/hadoop/hdfs/webapps/hdfs/dfsclusterhealth_utils.xsl new file mode 100644 index 0000000..8c89b42 --- /dev/null +++ b/aarch64/share/hadoop/hdfs/webapps/hdfs/dfsclusterhealth_utils.xsl @@ -0,0 +1,88 @@ +<!-- +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> + +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> + + <xsl:template name="humanReadableBytes"> + + <xsl:param name="number"/> + + <xsl:variable name="kb" select="1024"/> + <xsl:variable name="Mb" select="$kb * 1024"/> + <xsl:variable name="Gb" select="$Mb * 1024"/> + <xsl:variable name="Tb" select="$Gb * 1024"/> + <xsl:variable name="Pb" select="$Tb * 1024"/> + + + <xsl:choose> + <xsl:when test="$number < $kb"><xsl:value-of select="format-number($number, '#,###.##')"/> b</xsl:when> + <xsl:when test="$number < $Mb"><xsl:value-of select="format-number($number div $kb, '#,###.00')"/> kb</xsl:when> + <xsl:when test="$number < $Gb"><xsl:value-of select="format-number($number div $Mb, '#,###.00')"/> Mb</xsl:when> + <xsl:when test="$number < $Tb"><xsl:value-of select="format-number($number div $Gb, '#,###.00')"/> Gb</xsl:when> + + <xsl:when test="$number < $Pb"><xsl:value-of select="format-number($number div $Tb, '#,###.00')"/> Tb</xsl:when> + <xsl:when test="$number < ($Pb * 1024)"><xsl:value-of select="format-number($number div $Pb, '#,###.00')"/> Pb</xsl:when> + <xsl:otherwise><xsl:value-of select="format-number($number, '#,###.00')"/> b</xsl:otherwise> + </xsl:choose> + + </xsl:template> + + <xsl:template name="percentage"> + <xsl:param name="number"/> + <xsl:value-of select="format-number($number, '0.000%')"/> + </xsl:template> + + <!-- + Displays value: + - if it has parameter unit="b" then call humanReadableBytes + - if it has parameter link then call displayLink + --> + <xsl:template name="displayValue"> + <xsl:param name="value"/> + <xsl:param name="unit"/> + + <xsl:param name="link"/> + <xsl:choose> + <xsl:when test="$unit = 'b'"> + <xsl:call-template name="humanReadableBytes"> + <xsl:with-param name="number"> + <xsl:value-of select="@value"/> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + + <xsl:when test="$unit = '%'"> + <xsl:call-template name="percentage"> + <xsl:with-param name="number"> + <xsl:value-of select="@value"/> + </xsl:with-param> + </xsl:call-template> + </xsl:when> + <xsl:when test="string-length($link) > 0"> + <a href="{$link}"><xsl:value-of select="$value"/></a> + + </xsl:when> + <xsl:otherwise><xsl:value-of select="$value"/></xsl:otherwise> + </xsl:choose> + + </xsl:template> + +</xsl:stylesheet> + diff --git a/aarch64/share/hadoop/hdfs/webapps/hdfs/index.html b/aarch64/share/hadoop/hdfs/webapps/hdfs/index.html new file mode 100644 index 0000000..648da4a --- /dev/null +++ b/aarch64/share/hadoop/hdfs/webapps/hdfs/index.html @@ -0,0 +1,35 @@ +<meta HTTP-EQUIV="REFRESH" content="0;url=dfshealth.jsp"/> +<html> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<head> +<title>Hadoop Administration</title> +</head> + +<body> + +<h1>Hadoop Administration</h1> + +<ul> + +<li><a href="dfshealth.jsp">DFS Health/Status</a></li> + +</ul> + +</body> + +</html> |