diff --git a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/impl/BlockReaderFactory.java b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/impl/BlockReaderFactory.java index f4b62d91207..8fd990dbabc 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/impl/BlockReaderFactory.java +++ b/hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/client/impl/BlockReaderFactory.java @@ -646,7 +646,8 @@ public class BlockReaderFactory implements ShortCircuitReplicaCreator { default: LOG.warn(this + ": unknown response code " + resp.getStatus() + " while attempting to set up short-circuit access. " + - resp.getMessage()); + resp.getMessage() + ". Disabling short-circuit read for DataNode " + + datanode + " temporarily."); clientContext.getDomainSocketFactory() .disableShortCircuitForPath(pathInfo.getPath()); return null; diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java index 7e0c2bceff5..1d8db521f15 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java @@ -384,6 +384,8 @@ class DataXceiver extends Receiver implements Runnable { } catch (IOException e) { bld.setStatus(ERROR); bld.setMessage(e.getMessage()); + LOG.error("Request short-circuit read file descriptor" + + " failed with unknown error.", e); } bld.build().writeDelimitedTo(socketOut); if (fis != null) {