-
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-16540 Data locality is lost when DataNode pod restarts in kubern… #4170
Conversation
🎊 +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.
LGTM
...hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeManager.java
Outdated
Show resolved
Hide resolved
1316ff0
to
43bd835
Compare
...hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeManager.java
Show resolved
Hide resolved
43bd835
to
ccce180
Compare
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.
Some small comments, otherwise looks good to me.
...hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/DatanodeManager.java
Show resolved
Hide resolved
NameNode.stateChangeLog.info("BLOCK* registerDatanode: " + nodeS | ||
+ " is replaced by " + nodeReg + " with the same storageID " | ||
+ nodeReg.getDatanodeUuid()); | ||
+ nodeReg.getDatanodeUuid() + ", updateHost2DatanodeMap: " + updateHost2DatanodeMap); |
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.
Is this extra information needed at the INFO
level log? I understand that having the value printed is helpful during development, but I don't think it's meaningful to an operator.
Also, if you're here to change a log message, maybe also change it to use the format string version instead of string concatenation?
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.
Yeah, agree. Let me undo this change.
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 am going to upload the patch which does not log updateHost2DatanodeMap.
...op-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestDatanodeManager.java
Show resolved
Hide resolved
💔 -1 overall
This message was automatically generated. |
ccce180
to
f73d13a
Compare
💔 -1 overall
This message was automatically generated. |
I run the failed test [.TestReplaceDatanodeFailureReplication.testWithOnlyLastDatanodeIsAlive] locally multiple times, it passed. |
Any more comments? 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.
LGTM.
I'll merge later today (unless someone else beats me to it). |
…n kubernetes (#4170)" Revert to add the '.' after HDFS-16540 so commit message format matches precedent This reverts commit bda0881.
…netes (#4170) This reverts the previous commit 4e47eb6 undone so I could reapply with the '.' after the HDFS-16540 as is done in all other commits.
…netes (apache#4170) Cherry-pick of 9ed8d60
…netes (apache#4170) Cherry-pick of 9ed8d60
Sorry for late response. Just found that this PR involved unrelated changes '.BUILDING.txt.swp' under root path of project. If no other concerns I would like to remove it for a while. |
…etes (apache#4170) When DN with the same UUID is registered with a different IP, host2DatanodeMap needs to be updated accordingly.
…n kubernetes (apache#4170)" Revert to add the '.' after HDFS-16540 so commit message format matches precedent This reverts commit bda0881.
…netes (apache#4170) This reverts the previous commit 4e47eb6 undone so I could reapply with the '.' after the HDFS-16540 as is done in all other commits.
…etes
Description of PR
When Dn with the same uuid is registered with a different ip, host2DatanodeMap needs to be updated accordingly.
How was this patch tested?
Tested 3.3.2 with the patch on a eks cluster, restarted the pod hosting DataNode and HBase region server. After that, doing a major compaction of Hbase region, made sure that locality is kept.
There is also a new unittest case added.
For code changes:
LICENSE
,LICENSE-binary
,NOTICE-binary
files?