tomscut commented on a change in pull request #4057:
URL: https://github.com/apache/hadoop/pull/4057#discussion_r830932014



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockManager.java
##########
@@ -2751,6 +2751,11 @@ public boolean checkBlockReportLease(BlockReportContext 
context,
       return true;
     }
     DatanodeDescriptor node = datanodeManager.getDatanode(nodeID);
+    if (node == null) {
+      final UnregisteredNodeException e = new 
UnregisteredNodeException(nodeID, null);
+      NameNode.stateChangeLog.error("BLOCK* NameSystem.getDatanode: " + 
e.getLocalizedMessage());
+      throw e;

Review comment:
       > Can you share me the log message and the exception trace post this. We 
have passed null here in the exception. I feel like it can lead to something 
like: `Node null is expected to serve this storage`
   > 
   > Which doesn't make sense to me. May be some more appropriate message 
should be there.
   
   @ayushtkn Yes, you are right. The log will be: `Node null is expected to 
serve this storage`. I passed `node` in last commit, but there is a spotbug: 
[link](https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4057/2/artifact/out/new-spotbugs-hadoop-hdfs-project_hadoop-hdfs.html).
 So I passed `null`. This is just for adaptation UnregisteredNodeException 
constructor. 
   
   Do you have any suggestions for this. Thank you very much.
   
   




-- 
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]

Reply via email to