[ 
https://issues.apache.org/jira/browse/HDFS-453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12742874#action_12742874
 ] 

Steve Loughran commented on HDFS-453:
-------------------------------------


* I like the tests here; nice trick of handing off to the XML parser the task 
of retrieving the XML; no need for any other work on your part.
* I'm not sure that dfshealth.xml.jsp is valid XML though, as there is a </br> 
at the end of <inode_limit>, which worries me
* regarding JSP vs JSPX, yes, the .jspx files are parsed differently - they 
have to be well-formed XML, as defined by the JSP 2.0 specification: 
http://java.sun.com/products/jsp/reference/api/index.html

JSPX pages stop you accidentallly getting too much stuff in front of the <? xml 
?> page, and encourage you to create well-formed XML as for all the bits that 
aren't scriptlet-generated text, your IDE will tell you off in advance, as will 
the JSP compiler. 

I'm attaching the .jspx equivalent, which 
# moves everything to the jspx syntax
# adds a todo item where the page doesn't handle the risk that the application 
isn't bonded to a namenode. Is this a risk? 
# turns off cache control

I've already mentioned in HDFS-91 that JSP content doesn't expire, which will 
burn anyone monitoring through a proxy server. Ideally we should have a JSP tag 
library that does this for every page, so there's no need to do it by hand in 
every JSP page. 


>  XML-based metrics as JSP servlet for NameNode
> ----------------------------------------------
>
>                 Key: HDFS-453
>                 URL: https://issues.apache.org/jira/browse/HDFS-453
>             Project: Hadoop HDFS
>          Issue Type: New Feature
>            Reporter: Aaron Kimball
>            Assignee: Aaron Kimball
>         Attachments: dfshealth.xml.jspx, HDFS-453.2.patch, HDFS-453.patch
>
>
> In HADOOP-4559, a general REST API for reporting metrics was proposed but 
> work seems to have stalled. In the interim, we have a simple XML translation 
> of the existing NameNode status page which provides the same metrics as the 
> human-readable page. This is a relatively lightweight addition to provide 
> some machine-understandable metrics reporting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to