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

WebHDFS not considering whether a DN is good when called from outside the cluster

    XMLWordPrintableJSON

Details

    Description

      When calling WebHDFS to create a file (I'm sure the same problem occurs for other actions e.g. OPEN but I haven't checked all of them yet) it will happily redirect to nodes that are in maintenance.

      The reason is in the chooseDatanode method in NamenodeWebHdfsMethods where it will only call the BlockPlacementPolicy (which considers all these edge cases) in case the remoteAddr (i.e. the address making the request to WebHDFS) is also running a DataNode.
       
      In all other cases it just refers to NetworkTopology#chooseRandom which does not consider any of these circumstances (e.g. load, maintenance).

      I don't understand the reason to not just always refer to the placement policy and we're currently testing a patch to do just that.

      I have attached a draft patch for now.

       

      Attachments

        1. Test_fix_for_HDFS-171811.patch
          2 kB
          Lars Francke

        Issue Links

          Activity

            People

              larsfrancke Lars Francke
              larsfrancke Lars Francke
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: