lfrancke opened a new pull request, #6108:
URL: https://github.com/apache/hadoop/pull/6108
<!--
Thanks for sending a pull request!
1. If this is your first time, please read our contributor guidelines:
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
2. Make sure your PR title starts with JIRA issue id, e.g.,
'HADOOP-17799. Your PR title ...'.
-->
### Description of PR
https://issues.apache.org/jira/browse/HDFS-17181
When calling WebHDFS to create a file 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 so this PR fixes that
### How was this patch tested?
We tested it in production and ran the unit tests (had some issues with
those so let's see what the builds here say)
### For code changes:
- [x] Does the title or this PR starts with the corresponding JIRA issue id
(e.g. 'HADOOP-17799. Your PR title ...')?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]