diff --git a/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutput.java b/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutput.java index 2dcbf56ade8f..0987c482edb7 100644 --- a/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutput.java +++ b/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutput.java @@ -333,8 +333,8 @@ public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exc if (evt instanceof IdleStateEvent) { IdleStateEvent e = (IdleStateEvent) evt; if (e.state() == READER_IDLE) { - failed(ctx.channel(), - () -> new IOException("Timeout(" + timeoutMs + "ms) waiting for response")); + failed(ctx.channel(), () -> new IOException("Timeout(" + timeoutMs + + "ms) waiting for response from datanode " + ctx.channel().remoteAddress())); } else if (e.state() == WRITER_IDLE) { PacketHeader heartbeat = new PacketHeader(4, 0, HEART_BEAT_SEQNO, false, 0, false); int len = heartbeat.getSerializedSize(); diff --git a/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputHelper.java b/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputHelper.java index 1f1da6615586..f064980b6ebc 100644 --- a/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputHelper.java +++ b/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputHelper.java @@ -345,7 +345,8 @@ protected void channelRead0(ChannelHandlerContext ctx, BlockOpResponseProto resp if (PipelineAck.isRestartOOBStatus(pipelineStatus)) { throw new IOException("datanode " + dnInfo + " is restarting"); } - String logInfo = "ack with firstBadLink as " + resp.getFirstBadLink(); + String logInfo = "ack with firstBadLink as " + resp.getFirstBadLink() + " from datanode " + + dnInfo.getHostName() + "/" + dnInfo.getInfoAddr(); if (resp.getStatus() != Status.SUCCESS) { if (resp.getStatus() == Status.ERROR_ACCESS_TOKEN) { throw new InvalidBlockTokenException("Got access token error" + ", status message " @@ -378,8 +379,9 @@ public void channelInactive(ChannelHandlerContext ctx) throws Exception { @Override public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { if (evt instanceof IdleStateEvent && ((IdleStateEvent) evt).state() == READER_IDLE) { - promise - .tryFailure(new IOException("Timeout(" + timeoutMs + "ms) waiting for response")); + promise.tryFailure( + new IOException("Timeout(" + timeoutMs + "ms) waiting for response from datanode " + + dnInfo.getHostName() + "/" + dnInfo.getInfoAddr())); } else { super.userEventTriggered(ctx, evt); } diff --git a/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputSaslHelper.java b/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputSaslHelper.java index a39c4fba7919..3650854e6e18 100644 --- a/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputSaslHelper.java +++ b/hbase-asyncfs/src/main/java/org/apache/hadoop/hbase/io/asyncfs/FanOutOneBlockAsyncDFSOutputSaslHelper.java @@ -607,7 +607,8 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws E @Override public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { if (evt instanceof IdleStateEvent && ((IdleStateEvent) evt).state() == READER_IDLE) { - promise.tryFailure(new IOException("Timeout(" + timeoutMs + "ms) waiting for response")); + promise.tryFailure(new IOException("Timeout(" + timeoutMs + + "ms) waiting for response from datanode " + ctx.channel().remoteAddress())); } else { super.userEventTriggered(ctx, evt); }