li-leyang commented on code in PR #6446:
URL: https://github.com/apache/hadoop/pull/6446#discussion_r1450961197


##########
hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java:
##########
@@ -796,11 +797,18 @@ private synchronized int readBuffer(ReaderStrategy 
reader, int len,
         // we want to remember which block replicas we have tried
         corruptedBlocks.addCorruptedBlock(getCurrentBlock(), currentNode);
       } catch (IOException e) {
-        if (!retryCurrentNode) {
-          DFSClient.LOG.warn("Exception while reading from "
-              + getCurrentBlock() + " of " + src + " from "
-              + currentNode, e);
+        String msg = String.format("Failed to read block %s for file %s from 
datanode %s. "
+                + "Exception is %s. Retry with the current or next available 
datanode.",
+            getCurrentBlock().getBlockName(), src, currentNode.getXferAddr(), 
e);

Review Comment:
   Consider using `currentNode.getResolvedAddress`?



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