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

Lin Yiqun commented on HDFS-9951:
---------------------------------

The failed unit test 
{{org.apache.hadoop.hdfs.tools.offlineImageViewer.TestOfflineImageViewer}} is 
mostly because test method {{TestOfflineImageViewer#testReverseXmlRoundTrip}}. 
And this failed test has already happened after patch 001. It looks strange 
that the patch 001 was just replacing tags to string constants and I have a 
concretely check, there was no other operations. So what do you think, 
[~cmccabe].

> Use string constants for XML tags in OfflineImageReconstructor
> --------------------------------------------------------------
>
>                 Key: HDFS-9951
>                 URL: https://issues.apache.org/jira/browse/HDFS-9951
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Lin Yiqun
>            Assignee: Lin Yiqun
>            Priority: Minor
>         Attachments: HDFS-9551.001.patch, HDFS-9551.002.patch, 
> HDFS-9551.003.patch
>
>
> In class {{OfflineImageReconstructor}}, it uses many {{SectionProcessors}} to 
> process xml files and load the subtree of the XML into a Node structure. But 
> there are lots of places that node removes key by directively writing value 
> in methods rather than define them first. Like this:
> {code}
> Node expiration = directive.removeChild("expiration");
> {code}
> We could improve this to define them in Node and them invoked like this way:
> {code}
> Node expiration=directive.removeChild(Node.CACHE_MANAGER_SECTION_EXPIRATION);
> {code}
> And it will be good to manager node key's name in the future.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to