Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-2180

Refactor NameNode HTTP server into new class

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.0
    • Fix Version/s: 0.23.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      As discussed in HDFS-1974, it would be nice to refactor some parts of NameNode.java out into their own classes. This JIRA is to move out the HTTP server.

      1. hdfs-2180.txt
        44 kB
        Todd Lipcon
      2. hdfs-2180.txt
        41 kB
        Todd Lipcon

        Activity

        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #736 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/736/)
        HDFS-2180. Refactor NameNode HTTP server into new class. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1150960
        Files :

        • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/common/TestJspHelper.java
        • /hadoop/common/trunk/hdfs/src/webapps/hdfs/block_info_xml.jsp
        • /hadoop/common/trunk/hdfs/CHANGES.txt
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/BackupNode.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/common/JspHelper.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/FsckServlet.java
        • /hadoop/common/trunk/hdfs/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/ProxyFileDataServlet.java
        • /hadoop/common/trunk/hdfs/src/webapps/hdfs/corrupt_replicas_xml.jsp
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/GetDelegationTokenServlet.java
        • /hadoop/common/trunk/hdfs/src/webapps/hdfs/corrupt_files.jsp
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/Checkpointer.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/DfsServlet.java
        • /hadoop/common/trunk/hdfs/src/webapps/hdfs/dfshealth.jsp
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/RenewDelegationTokenServlet.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/GetImageServlet.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/FileDataServlet.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/CancelDelegationTokenServlet.java
        • /hadoop/common/trunk/hdfs/src/webapps/hdfs/dfsnodelist.jsp
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/FileChecksumServlets.java
        • /hadoop/common/trunk/hdfs/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/HdfsProxy.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #736 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/736/ ) HDFS-2180 . Refactor NameNode HTTP server into new class. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1150960 Files : /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/common/TestJspHelper.java /hadoop/common/trunk/hdfs/src/webapps/hdfs/block_info_xml.jsp /hadoop/common/trunk/hdfs/CHANGES.txt /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/BackupNode.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/common/JspHelper.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/FsckServlet.java /hadoop/common/trunk/hdfs/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/ProxyFileDataServlet.java /hadoop/common/trunk/hdfs/src/webapps/hdfs/corrupt_replicas_xml.jsp /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/GetDelegationTokenServlet.java /hadoop/common/trunk/hdfs/src/webapps/hdfs/corrupt_files.jsp /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/Checkpointer.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/DfsServlet.java /hadoop/common/trunk/hdfs/src/webapps/hdfs/dfshealth.jsp /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/RenewDelegationTokenServlet.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/GetImageServlet.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/FileDataServlet.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/CancelDelegationTokenServlet.java /hadoop/common/trunk/hdfs/src/webapps/hdfs/dfsnodelist.jsp /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/FileChecksumServlets.java /hadoop/common/trunk/hdfs/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/HdfsProxy.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #805 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/805/)
        HDFS-2180. Refactor NameNode HTTP server into new class. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1150960
        Files :

        • /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/common/TestJspHelper.java
        • /hadoop/common/trunk/hdfs/src/webapps/hdfs/block_info_xml.jsp
        • /hadoop/common/trunk/hdfs/CHANGES.txt
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/BackupNode.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/common/JspHelper.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/FsckServlet.java
        • /hadoop/common/trunk/hdfs/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/ProxyFileDataServlet.java
        • /hadoop/common/trunk/hdfs/src/webapps/hdfs/corrupt_replicas_xml.jsp
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/GetDelegationTokenServlet.java
        • /hadoop/common/trunk/hdfs/src/webapps/hdfs/corrupt_files.jsp
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/Checkpointer.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/DfsServlet.java
        • /hadoop/common/trunk/hdfs/src/webapps/hdfs/dfshealth.jsp
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/RenewDelegationTokenServlet.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/GetImageServlet.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/FileDataServlet.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/CancelDelegationTokenServlet.java
        • /hadoop/common/trunk/hdfs/src/webapps/hdfs/dfsnodelist.jsp
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
        • /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/FileChecksumServlets.java
        • /hadoop/common/trunk/hdfs/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/HdfsProxy.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #805 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/805/ ) HDFS-2180 . Refactor NameNode HTTP server into new class. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1150960 Files : /hadoop/common/trunk/hdfs/src/test/hdfs/org/apache/hadoop/hdfs/server/common/TestJspHelper.java /hadoop/common/trunk/hdfs/src/webapps/hdfs/block_info_xml.jsp /hadoop/common/trunk/hdfs/CHANGES.txt /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/BackupNode.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/common/JspHelper.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/FsckServlet.java /hadoop/common/trunk/hdfs/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/ProxyFileDataServlet.java /hadoop/common/trunk/hdfs/src/webapps/hdfs/corrupt_replicas_xml.jsp /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/GetDelegationTokenServlet.java /hadoop/common/trunk/hdfs/src/webapps/hdfs/corrupt_files.jsp /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NameNodeHttpServer.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NamenodeJspHelper.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/Checkpointer.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/DfsServlet.java /hadoop/common/trunk/hdfs/src/webapps/hdfs/dfshealth.jsp /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/RenewDelegationTokenServlet.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/GetImageServlet.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/FileDataServlet.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/CancelDelegationTokenServlet.java /hadoop/common/trunk/hdfs/src/webapps/hdfs/dfsnodelist.jsp /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java /hadoop/common/trunk/hdfs/src/java/org/apache/hadoop/hdfs/server/namenode/FileChecksumServlets.java /hadoop/common/trunk/hdfs/src/contrib/hdfsproxy/src/java/org/apache/hadoop/hdfsproxy/HdfsProxy.java
        Todd Lipcon made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Resolution Fixed [ 1 ]
        Hide
        Todd Lipcon added a comment -

        Committed to trunk based on Suresh's +1 above (addressed his 2 minor comments)

        Show
        Todd Lipcon added a comment - Committed to trunk based on Suresh's +1 above (addressed his 2 minor comments)
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12487761/hdfs-2180.txt
        against trunk revision 1150927.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 3 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        +1 system test framework. The patch passed system test framework compile.

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/1006//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/1006//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1006//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12487761/hdfs-2180.txt against trunk revision 1150927. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/1006//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/1006//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1006//console This message is automatically generated.
        Todd Lipcon made changes -
        Attachment hdfs-2180.txt [ 12487761 ]
        Hide
        Suresh Srinivas added a comment -

        Good refactoring.

        Comments:

        1. Minor nit: NameNode#loadNamesystem() - you can use getHttpAddress() instead of httpServer.getHttpAddress()
        2. Please remove TODO: in start() and track it as a jira or check with Jitendra or Owen.

        +1 for the patch with javac warning and comments addressed.

        Show
        Suresh Srinivas added a comment - Good refactoring. Comments: Minor nit: NameNode#loadNamesystem() - you can use getHttpAddress() instead of httpServer.getHttpAddress() Please remove TODO: in start() and track it as a jira or check with Jitendra or Owen. +1 for the patch with javac warning and comments addressed.
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12487243/hdfs-2180.txt
        against trunk revision 1148981.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 3 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        -1 javac. The patch appears to cause tar ant target to fail.

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        +1 system test framework. The patch passed system test framework compile.

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/984//testReport/
        Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/984//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/984//console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12487243/hdfs-2180.txt against trunk revision 1148981. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. -1 javac. The patch appears to cause tar ant target to fail. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/984//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/984//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/984//console This message is automatically generated.
        Todd Lipcon made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Todd Lipcon made changes -
        Field Original Value New Value
        Attachment hdfs-2180.txt [ 12487243 ]
        Hide
        Todd Lipcon added a comment -

        This is a fairly straightforward refactor. I did a small amount of cleanup of the start function, but not too much, so it would stay easy to review. We can always clean more later.

        Show
        Todd Lipcon added a comment - This is a fairly straightforward refactor. I did a small amount of cleanup of the start function, but not too much, so it would stay easy to review. We can always clean more later.
        Todd Lipcon created issue -

          People

          • Assignee:
            Todd Lipcon
            Reporter:
            Todd Lipcon
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development