MAPREDUCE-7156. NullPointerException when reaching max shuffle connections. Contributed by Peter Bacsko

(cherry picked from commit ba1f9d66d9)
This commit is contained in:
Jason Lowe 2018-11-06 17:55:51 -06:00
parent f65324aa47
commit afbcb51ac1
1 changed files with 2 additions and 2 deletions

View File

@ -910,6 +910,8 @@ public class ShuffleHandler extends AuxiliaryService {
@Override @Override
public void channelOpen(ChannelHandlerContext ctx, ChannelStateEvent evt) public void channelOpen(ChannelHandlerContext ctx, ChannelStateEvent evt)
throws Exception { throws Exception {
super.channelOpen(ctx, evt);
if ((maxShuffleConnections > 0) && (accepted.size() >= maxShuffleConnections)) { if ((maxShuffleConnections > 0) && (accepted.size() >= maxShuffleConnections)) {
LOG.info(String.format("Current number of shuffle connections (%d) is " + LOG.info(String.format("Current number of shuffle connections (%d) is " +
"greater than or equal to the max allowed shuffle connections (%d)", "greater than or equal to the max allowed shuffle connections (%d)",
@ -925,8 +927,6 @@ public class ShuffleHandler extends AuxiliaryService {
return; return;
} }
accepted.add(evt.getChannel()); accepted.add(evt.getChannel());
super.channelOpen(ctx, evt);
} }
@Override @Override