madrob commented on a change in pull request #4016:
URL: https://github.com/apache/hadoop/pull/4016#discussion_r812552531
##########
File path:
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java
##########
@@ -1378,7 +1378,7 @@ public long monotonicNow() {
private final BlockingQueue<Runnable> queue;
CommandProcessingThread(BPServiceActor actor) {
- super("Command processor");
+ setName("Command processor-" + getId());
Review comment:
Thanks for the suggestion, but I don't think that would be an
improvement. Let me explain the motivation in more detail?
The id is just the numeric Java thread id, and it's enough to differentiate
the command processors between each other when there are multiple DN running in
the same process like in MiniDFSCluster during unit tests.
Putting the NN address in would not disambiguate the logs because they would
all be for the same NN still. It would give more information, sure, but not
actually helpful information.
With my change, the log messages would have (Command processor-56) or -68 or
whatever the thread was. Again, just enough to differentiate them from one
another, which is what I needed for tracing their lifecycle and operation.
If there's a DN address we can use in the thread name instead, then that's
good too but I don't know enough about Hadoop internals to find that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]