-
Notifications
You must be signed in to change notification settings - Fork 8.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDFS-17642. Add target node list, exclude source node list, and exclude target node list parameters to balancer #7127
Conversation
…y moves blocks to those nodes
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comments then LGTM for adding the parameters. I assume this needs a separate commit for the functionality itself. Is OSS okay with merging this now or should we wait until we have both commits?
...-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java
Outdated
Show resolved
Hide resolved
...-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java
Outdated
Show resolved
Hide resolved
…, clarified when processing excluded source/target lists
...-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java
Outdated
Show resolved
Hide resolved
…ludeSource or target & excludeTarget options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I don't have approval permissions
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
@aQuigs This PR includes functionality - the change in private long init(List reports) method is where we filter out the allowed/excluded nodes from being targets or or sources |
Ah, got it, I overlooked that piece. LGTM - thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the work! I left a comment about adding test coverage.
Also please fix the checkstyle issues that this patch adds: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7127/5/artifact/out/results-checkstyle-hadoop-hdfs-project_hadoop-hdfs.txt
...s-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/balancer/TestBalancer.java
Show resolved
Hide resolved
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
Thanks @Jtdellaringa and @ctrezzo @aQuigs . Make sense to me. Please rebase the source code and fix the checkstyle first. |
BalancerParameters.DEFAULT.getIncludedNodes()), false, | ||
false, p); | ||
} catch (Exception e) { | ||
if (!e.getMessage().contains(String.valueOf(ExitStatus.NO_MOVE_BLOCK.getExitCode()))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now the unit tests pass in the cases where:
- no exception is thrown
- an exception with NO_MOVE_BLOCK exit code in the message
Are the above two cases intended behavior?
If 2 is the only expected pass case, then we should either annotate the test with the expected failure or use the junit assertThrows (I forget which version this assert is available in).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated the tests accordingly, thank you for catching this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Jtdellaringa for the work! It looks good to me. I will wait for yetus to do a full run to see of all issues are resolved and then commit if it looks good.
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
Committed! Thanks for the work @Jtdellaringa ! |
…de target node list parameters to balancer (apache#7127) HDFS-17642. Add target node list, exclude source node list, and exclude target node list parameters to balancer (apache#7127) --------- Co-authored-by: Joseph DellAringa <jdellari@linkedin.com>
…de target node list parameters to balancer (apache#7127) HDFS-17642. Add target node list, exclude source node list, and exclude target node list parameters to balancer (apache#7127) --------- Co-authored-by: Joseph DellAringa <jdellari@linkedin.com>
…de target node list parameters to balancer (apache#7127) HDFS-17642. Add target node list, exclude source node list, and exclude target node list parameters to balancer (apache#7127) --------- Co-authored-by: Joseph DellAringa <jdellari@linkedin.com>
…de target node list parameters to balancer (apache#7127) HDFS-17642. Add target node list, exclude source node list, and exclude target node list parameters to balancer (apache#7127) --------- Co-authored-by: Joseph DellAringa <jdellari@linkedin.com>
Description of PR
Adds target parameter to balancer which will allow only datanodes in the provided list of hosts to be picked as a target node.
Adds excludeSource and excludeTarget parameters to balancer which will exclude specified hosts from being picked as a source or target node.
How was this patch tested?
mvn install -DskipTests
add unit test for parameter check in balancer
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?