Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
if (resp.getStatus() != Status.SUCCESS) {
if (resp.getStatus() == Status.ERROR_ACCESS_TOKEN) {
throw new InvalidBlockTokenException("Got access token error" + ", status message "
Expand Down Expand Up @@ -378,8 +379,8 @@ 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(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srinireddy2020
In other two places we are logging "channel.remoteAddress" in message and here dnInfo.toString.

Can't we keep it consistent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the method parameter already having the DN details so no need to call channel.remoteAddress.

"Timeout(" + timeoutMs + "ms) waiting for response from datanode " + dnInfo));
} else {
super.userEventTriggered(ctx, evt);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down