Skip to content

Commit

Permalink
Fix according to review
Browse files Browse the repository at this point in the history
  • Loading branch information
Thesharing authored and pnowojski committed Jun 9, 2021
1 parent b773fb3 commit 4d73310
Showing 1 changed file with 6 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,12 @@ public void requestSubpartition(
public void operationComplete(ChannelFuture future) throws Exception {
if (!future.isSuccess()) {
clientHandler.removeInputChannel(inputChannel);
SocketAddress remoteAddr = future.channel().remoteAddress();
String address =
remoteAddr == null
? String.format(
"%s (#%d)",
connectionId.getAddress(),
connectionId.getConnectionIndex())
: remoteAddr.toString();
inputChannel.onError(
new LocalTransportException(
String.format(
"Sending the partition request to '%s' failed.",
address),
"Sending the partition request to '%s (#%d)' failed.",
connectionId.getAddress(),
connectionId.getConnectionIndex()),
future.channel().localAddress(),
future.cause()));
}
Expand Down Expand Up @@ -187,19 +180,12 @@ public void sendTaskEvent(
@Override
public void operationComplete(ChannelFuture future) throws Exception {
if (!future.isSuccess()) {
SocketAddress remoteAddr = future.channel().remoteAddress();
String address =
remoteAddr == null
? String.format(
"%s (#%d)",
connectionId.getAddress(),
connectionId.getConnectionIndex())
: remoteAddr.toString();
inputChannel.onError(
new LocalTransportException(
String.format(
"Sending the task event to '%s' failed.",
address),
"Sending the task event to '%s (#%d)' failed.",
connectionId.getAddress(),
connectionId.getConnectionIndex()),
future.channel().localAddress(),
future.cause()));
}
Expand Down

0 comments on commit 4d73310

Please sign in to comment.