-
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-16427. Add debug log for BlockManager#chooseExcessRedundancyStriped #3888
Conversation
💔 -1 overall
This message was automatically generated. |
@tomscut Sorry for being late. I agree with adding more EC logs, but I feel that the log information is too detailed, and some variables duplicate with other variables. Could you please make it more concise and descriptive? |
Thanks @tasanuma for your review. These states are related to each other, and if the upper and lower states don't match, there is something wrong with the process in between. Maybe If simplify this log, I would remove |
At that time, we found that the |
💔 -1 overall
This message was automatically generated. |
Hi @tasanuma , could you please take a look again. Thank you very much. |
@tomscut IMHO, adding unit tests and assertions would be better than logging all variables to prevent inconsistent conditions between variables. For example, I suggest adding the following Preconditions to avoid inconsistencies between Preconditions.checkArgument(candidates.containsAll(replicasToDelete)); I still agree with adding more EC debug logs for not only developers but also non-developers. I prefer more descriptive logging rather than using variable names directly. And I think LOG.debug("Choose redundant EC replicas to delete from blk_{} which is located in {}", sblk.getBlockId(), storage2index);
LOG.debug("Storages with candidate blocks to be deleted: {}", candidates);
LOG.debug("Storages with blocks to be deleted: {}", replicasToDelete); |
Thanks @tasanuma for your advice, it makes sense to me. I updated it. Please take a look. Thank you. |
...ct/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
Outdated
Show resolved
Hide resolved
Co-authored-by: tasanuma <[email protected]> Co-authored-by: Takanobu Asanuma <[email protected]>
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
Merged it. Thanks for your contribution, @tomscut! |
…ped (apache#3888) (cherry picked from commit 6136d63)
JIRA: HDFS-16427.
To solve this issue HDFS-16420 , we added some debug logs, which were also necessary. If there are other problems, we set the log level to DEBUG, which is convenient to analyze it.