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

Add a proper scheme to the datanode links in NN web UI

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0, 3.0.0-alpha4, 2.8.2
    • Component/s: None
    • Labels:
      None
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      On the datanodes page of the namenode web UI, the datanode links may not be correct if the namenode is serving the page through http but https is also enabled. This is because dfshealth.js does not put a proper scheme in front of the address. It already determines whether the address is non-secure or secure. It can simply prepend http: or https: to what it is currently setting.

      The existing mechanism would work for YARN and MAPRED, since they can only serve one protocol, HTTP or HTTPS.

        Issue Links

          Activity

          Hide
          hadoopqa Hadoop QA added a comment -
          +1 overall



          Vote Subsystem Runtime Comment
          0 reexec 0m 27s Docker mode activated.
          +1 @author 0m 0s The patch does not contain any @author tags.
          +1 whitespace 0m 0s The patch has no whitespace issues.
          +1 asflicense 0m 14s The patch does not generate ASF License warnings.
          0m 58s



          Subsystem Report/Notes
          Docker Image:yetus/hadoop:0ac17dc
          JIRA Issue HDFS-11691
          JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12864571/HDFS-11691.patch
          Optional Tests asflicense
          uname Linux a1fa35c3cf7b 4.4.0-43-generic #63-Ubuntu SMP Wed Oct 12 13:48:03 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
          Build tool maven
          Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh
          git revision trunk / 5078df7
          modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs
          Console output https://builds.apache.org/job/PreCommit-HDFS-Build/19174/console
          Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org

          This message was automatically generated.

          Show
          hadoopqa Hadoop QA added a comment - +1 overall Vote Subsystem Runtime Comment 0 reexec 0m 27s Docker mode activated. +1 @author 0m 0s The patch does not contain any @author tags. +1 whitespace 0m 0s The patch has no whitespace issues. +1 asflicense 0m 14s The patch does not generate ASF License warnings. 0m 58s Subsystem Report/Notes Docker Image:yetus/hadoop:0ac17dc JIRA Issue HDFS-11691 JIRA Patch URL https://issues.apache.org/jira/secure/attachment/12864571/HDFS-11691.patch Optional Tests asflicense uname Linux a1fa35c3cf7b 4.4.0-43-generic #63-Ubuntu SMP Wed Oct 12 13:48:03 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux Build tool maven Personality /testptch/hadoop/patchprocess/precommit/personality/provided.sh git revision trunk / 5078df7 modules C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs Console output https://builds.apache.org/job/PreCommit-HDFS-Build/19174/console Powered by Apache Yetus 0.5.0-SNAPSHOT http://yetus.apache.org This message was automatically generated.
          Hide
          cheersyang Weiwei Yang added a comment -

          Hi Kihwal Lee

          Thanks for catching and fixing this. I have one small comment here

          +    <td ng-value="{state}-{name}"><a href='{dnWebAddress}'>{dnWebAddress}</a></td>
          

          this way datanode link field on UI will also display http://datanodehost:port instead of datanodehost:port, this look&feel change will be OK right?

          Show
          cheersyang Weiwei Yang added a comment - Hi Kihwal Lee Thanks for catching and fixing this. I have one small comment here + <td ng-value= "{state}-{name}" ><a href='{dnWebAddress}'>{dnWebAddress}</a></td> this way datanode link field on UI will also display http://datanodehost:port instead of datanodehost:port , this look&feel change will be OK right?
          Hide
          kihwal Kihwal Lee added a comment -

          this way datanode link field on UI will also display http://datanodehost:port instead of datanodehost:port, this look&feel change will be OK right?

          Yes, I saw that during testing. I think that's acceptable or may even be preferable.

          Show
          kihwal Kihwal Lee added a comment - this way datanode link field on UI will also display http://datanodehost:port instead of datanodehost:port, this look&feel change will be OK right? Yes, I saw that during testing. I think that's acceptable or may even be preferable.
          Hide
          jlowe Jason Lowe added a comment -

          +1 lgtm. I'll commit this later today if there are no objections.

          Show
          jlowe Jason Lowe added a comment - +1 lgtm. I'll commit this later today if there are no objections.
          Hide
          jlowe Jason Lowe added a comment -

          Thanks to Kihwal Lee for the contribution and to Weiwei Yang for additional review! I committed this to trunk, branch-2, branch-2.8, and branch-2.8.1.

          Show
          jlowe Jason Lowe added a comment - Thanks to Kihwal Lee for the contribution and to Weiwei Yang for additional review! I committed this to trunk, branch-2, branch-2.8, and branch-2.8.1.
          Hide
          hudson Hudson added a comment -

          SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11628 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11628/)
          HDFS-11691. Add a proper scheme to the datanode links in NN web UI. (jlowe: rev e4321ec84321672a714419278946fe1012daac71)

          • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.html
          • (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.js
          Show
          hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #11628 (See https://builds.apache.org/job/Hadoop-trunk-Commit/11628/ ) HDFS-11691 . Add a proper scheme to the datanode links in NN web UI. (jlowe: rev e4321ec84321672a714419278946fe1012daac71) (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.html (edit) hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/hdfs/dfshealth.js
          Hide
          vinodkv Vinod Kumar Vavilapalli added a comment -

          2.8.1 became a security release. Moving fix-version to 2.8.2 after the fact.

          Show
          vinodkv Vinod Kumar Vavilapalli added a comment - 2.8.1 became a security release. Moving fix-version to 2.8.2 after the fact.

            People

            • Assignee:
              kihwal Kihwal Lee
              Reporter:
              kihwal Kihwal Lee
            • Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development