-
Couldn't load subscription status.
- Fork 9.1k
HDFS-15551. Tiny Improve for DeadNode detector #2265
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
Conversation
1. add or improve some logs for adding local & global deadnodes 2. logic improve 3. fix typo
|
💔 -1 overall
This message was automatically generated. |
| private byte[] oneByteBuf; // used for 'int read()' | ||
|
|
||
| protected void addToLocalDeadNodes(DatanodeInfo dnInfo) { | ||
| DFSClient.LOG.debug("Add {} to local dead nodes, previously was {}", |
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.
1、Is it necessary to add log in Local dead nodes?
2、if add debug log in DFSInputStream#addToLocalDeadNodes, do you need add log in DFSInputStream#removeFromLocalDeadNodes?
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.
- From the statistics of the production environment, the log output of local
deadnodeinformation is too few, so that it is troublesome to find the problem reason - The reason to use the
DEBUGlog level is to separate from theINFOlog level of the detector, and the impact is small. - Remove logs can be added at the same time(I think both are OK). It was not added before considering that the local dead node removal method will almost never be called, unless the detector is turned on and there is already log output there.
| datanodeInfos.add(datanodeInfo); | ||
| } | ||
|
|
||
| LOG.warn("Add datanode {} to suspectAndDeadNodes", datanodeInfo); |
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.
One case: when a lot of stale relicas, will the log flood?
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.
use DEBUG as default now
...p-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DeadNodeDetector.java
Outdated
Show resolved
Hide resolved
|
💔 -1 overall
This message was automatically generated. |
|
+1 LGFM. |
|
@Hexiaoqiao Could u help me check if there are any other questions? |
Contributed by imbajin. Reviewed-by: leosunli <[email protected]> Signed-off-by: He Xiaoqiao <[email protected]> (cherry picked from commit 89428f1)
JIRA URL