Skip to content

Commit 8fefb83

Browse files
committed
checkstyle fixes
Change-Id: Iaf37e847d689c6b46a5d819f3397865e1d2c05d7
1 parent ea8f12a commit 8fefb83

File tree

1 file changed

+13
-10
lines changed
  • hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred

1 file changed

+13
-10
lines changed

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-shuffle/src/main/java/org/apache/hadoop/mapred/ShuffleChannelHandler.java

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@
125125
* +--------+-------------------------------------------------+----------------+
126126
* </pre>
127127
*/
128-
@SuppressWarnings("checkstyle:LineLength")
129128
public class ShuffleChannelHandler extends SimpleChannelInboundHandler<FullHttpRequest> {
130129
private final ShuffleChannelHandlerContext handlerCtx;
131130

@@ -313,7 +312,6 @@ public void sendMap(ReduceContext reduceContext) {
313312
}
314313
LOG.trace("Calling sendMapOutput; channel='{}'", reduceContext.ctx.channel().id());
315314
ChannelFuture nextMap = sendMapOutput(
316-
reduceContext.getCtx(),
317315
reduceContext.getCtx().channel(),
318316
reduceContext.getUser(), mapId,
319317
reduceContext.getReduceId(), info);
@@ -493,8 +491,7 @@ public static ByteBuf shuffleHeaderToBytes(ShuffleHeader header) throws IOExcept
493491
return wrappedBuffer(dob.getData(), 0, dob.getLength());
494492
}
495493

496-
protected ChannelFuture sendMapOutput(ChannelHandlerContext ctx, Channel ch,
497-
String user, String mapId, int reduce,
494+
protected ChannelFuture sendMapOutput(Channel ch, String user, String mapId, int reduce,
498495
MapOutputInfo mapOutputInfo)
499496
throws IOException {
500497
final IndexRecord info = mapOutputInfo.indexRecord;
@@ -678,30 +675,36 @@ static class ReduceMapFileCount implements ChannelFutureListener {
678675

679676
@Override
680677
public void operationComplete(ChannelFuture future) throws Exception {
681-
LOG.trace("SendMap operation complete; mapsToWait='{}', channel='{}'", this.reduceContext.getMapsToWait().get(), future.channel().id());
678+
LOG.trace("SendMap operation complete; mapsToWait='{}', channel='{}'",
679+
this.reduceContext.getMapsToWait().get(), future.channel().id());
682680
if (!future.isSuccess()) {
683-
LOG.error("Future is unsuccessful. channel='{}' Cause: ", future.channel().id(), future.cause());
681+
LOG.error("Future is unsuccessful. channel='{}' Cause: ",
682+
future.channel().id(), future.cause());
684683
future.channel().close();
685684
return;
686685
}
687686
int waitCount = this.reduceContext.getMapsToWait().decrementAndGet();
688687
if (waitCount == 0) {
689-
ChannelFuture lastContentFuture = future.channel().writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT);
688+
ChannelFuture lastContentFuture =
689+
future.channel().writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT);
690690
handler.handlerCtx.metrics.operationComplete(future);
691691

692692
// Let the idle timer handler close keep-alive connections
693693
if (reduceContext.getKeepAlive()) {
694-
LOG.trace("SendMap operation complete, keeping alive the connection; channel='{}'", future.channel().id());
694+
LOG.trace("SendMap operation complete, keeping alive the connection; channel='{}'",
695+
future.channel().id());
695696
ChannelPipeline pipeline = future.channel().pipeline();
696697
ShuffleHandler.TimeoutHandler timeoutHandler =
697698
(ShuffleHandler.TimeoutHandler)pipeline.get(TIMEOUT_HANDLER);
698699
timeoutHandler.setEnabledTimeout(true);
699700
} else {
700-
LOG.trace("SendMap operation complete, closing connection; channel='{}'", future.channel().id());
701+
LOG.trace("SendMap operation complete, closing connection; channel='{}'",
702+
future.channel().id());
701703
lastContentFuture.addListener(ChannelFutureListener.CLOSE);
702704
}
703705
} else {
704-
LOG.trace("SendMap operation complete, waitCount > 0, invoking sendMap with reduceContext; channel='{}'",
706+
LOG.trace("SendMap operation complete, waitCount > 0, " +
707+
"invoking sendMap with reduceContext; channel='{}'",
705708
future.channel().id());
706709
handler.sendMap(reduceContext);
707710
}

0 commit comments

Comments
 (0)