Description
Their are some situations that different exception types are caught, but the handling of those exceptions can not show the differences of those types. Here are the code snippets we found which have this problem:
hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BPServiceActor.java
At Line 233 and Line 235. We can see that two exception types are caught, but the logging statements here can not show the exception type at all.
Also there are comments for these two catch clauses respectively, one is "// namenode is busy", the other one is "// namenode is not available", but the log messages are too generic, can not show the "busy" or "not available" of namenode.
It may cause confusions to the person who is reading the log, the person can not know what exception happened here and can not distinguish logs generated by these two statements.
Maybe adding stack trace information to these two logging statements and change the log message to handle specific situations is a simple way to improve it.