-
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-15634 [WIP] Invalidate replica on decommissioning/decommissioned… #2388
base: trunk
Are you sure you want to change the base?
Conversation
return storedBlock; | ||
} | ||
|
||
// If there are enough live replicas, start invalidating | ||
// decommissioned + decommissioning replicas | ||
private boolean shouldInvalidateDecommissionedRedundancy(NumberReplicas num, |
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.
It makes sense. Maybe we should describe some of the JIRA description in this method to explain what we are doing in the high level.
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.
Good idea.
if(storedBlock.getBlockUCState() == BlockUCState.COMMITTED && | ||
|
||
// if block is still under construction, then done for now | ||
if (!storedBlock.isCompleteOrCommitted()) { |
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.
Why do we move this block here?
BTW we can leave it as a single if with a return.
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 felt quite confused with the original structure since the early return was put after the statements it is trying to avoid..
I can make it a single return no big deal.
💔 -1 overall
This message was automatically generated. |
Will put another patch with UT soon |
… Datanodes
NOTICE
Please create an issue in ASF JIRA before opening a pull request,
and you need to set the title of the pull request which starts with
the corresponding JIRA issue number. (e.g. HADOOP-XXXXX. Fix a typo in YYY.)
For more details, please see https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute