Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-9951

Use string constants for XML tags in OfflineImageReconstructor

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Tags:
      tools

      Description

      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:

      Node expiration = directive.removeChild("expiration");
      

      We could improve this to define them in Node and them invoked like this way:

      Node expiration=directive.removeChild(Node.CACHE_MANAGER_SECTION_EXPIRATION);
      

      And it will be good to manager node key's name in the future.

        Attachments

        1. HDFS-9551.004.patch
          74 kB
          Yiqun Lin
        2. HDFS-9551.003.patch
          74 kB
          Yiqun Lin
        3. HDFS-9551.002.patch
          76 kB
          Yiqun Lin
        4. HDFS-9551.001.patch
          42 kB
          Yiqun Lin

          Activity

            People

            • Assignee:
              linyiqun Yiqun Lin
              Reporter:
              linyiqun Yiqun Lin
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: