Source:
<code>private MessageExchangeDriver( @Parameter(MessageExchangeParameters.SenderNumber.class) final int senderNumber, @Parameter(MessageExchangeParameters.ReceiverNumber.class) final int receiverNumber, final EvaluatorRequestor evaluatorRequestor, final ShuffleDriver shuffleDriver, final LocalAddressProvider localAddressProvider, final NameServer nameServer, @Parameter(MessageExchangeParameters.Shutdown.class) final boolean shutdown, @Parameter(MessageExchangeParameters.TotalIterationNum.class) final int numTotalIterations, @Parameter(MessageExchangeParameters.ShutdownIterationNum.class) final int numShutdownIterations) { LOG.log(Level.INFO, "The Driver is instantiated. sender num: {0}, receiver num: {1}", new Object[]{senderNumber, receiverNumber}); this.numAllocatedEvaluators = new AtomicInteger(); this.numCompletedTasks = new AtomicInteger(); this.totalNumSentTuples = new AtomicInteger(); this.totalNumReceivedTuples = new AtomicInteger(); this.evaluatorRequestor = evaluatorRequestor; this.shuffleDriver = shuffleDriver; this.localAddressProvider = localAddressProvider; this.nameServer = nameServer; this.totalNumSenders = senderNumber; this.totalNumReceivers = receiverNumber; final List<String> senderIdList = new ArrayList<>(senderNumber); final List<String> receiverIdList = new ArrayList<>(receiverNumber); <START> this.numTotalIterations = numTotalIterations; <END> for (int i = 0; i < senderNumber; i++) { senderIdList.add(SENDER_PREFIX + i); } for (int i = 0; i < receiverNumber; i++) { receiverIdList.add(RECEIVER_PREFIX + i); } this.shuffleManager = shuffleDriver.registerShuffle( ShuffleDescriptionImpl.newBuilder(MESSAGE_EXCHANGE_SHUFFLE_NAME) .setSenderIdList(senderIdList) .setReceiverIdList(receiverIdList) .setKeyCodecClass(IntegerCodec.class) .setValueCodecClass(IntegerCodec.class) .setShuffleStrategyClass(KeyShuffleStrategy.class) .build() ); this.shuffleManager.setPushShuffleListener( new SimplePushShuffleListener(shuffleManager, shutdown, numShutdownIterations)); }</code><technical_language>Change position of this line next of this.totalNumReceivers = receiverNumber</technical_language>

Target:
private MessageExchangeDriver( @Parameter(MessageExchangeParameters.SenderNumber.class) final int senderNumber, @Parameter(MessageExchangeParameters.ReceiverNumber.class) final int receiverNumber, final EvaluatorRequestor evaluatorRequestor, final ShuffleDriver shuffleDriver, final LocalAddressProvider localAddressProvider, final NameServer nameServer, @Parameter(MessageExchangeParameters.Shutdown.class) final boolean shutdown, @Parameter(MessageExchangeParameters.TotalIterationNum.class) final int numTotalIterations, @Parameter(MessageExchangeParameters.ShutdownIterationNum.class) final int numShutdownIterations) { LOG.log(Level.INFO, "The Driver is instantiated. sender num: {0}, receiver num: {1}", new Object[]{senderNumber, receiverNumber}); this.numAllocatedEvaluators = new AtomicInteger(); this.numCompletedTasks = new AtomicInteger(); this.totalNumSentTuples = new AtomicInteger(); this.totalNumReceivedTuples = new AtomicInteger(); this.evaluatorRequestor = evaluatorRequestor; this.shuffleDriver = shuffleDriver; this.localAddressProvider = localAddressProvider; this.nameServer = nameServer; this.totalNumSenders = senderNumber; this.totalNumReceivers = receiverNumber; this.numTotalIterations = numTotalIterations; final List<String> senderIdList = new ArrayList<>(senderNumber); final List<String> receiverIdList = new ArrayList<>(receiverNumber); for (int i = 0; i < senderNumber; i++) { senderIdList.add(SENDER_PREFIX + i); } for (int i = 0; i < receiverNumber; i++) { receiverIdList.add(RECEIVER_PREFIX + i); } this.shuffleManager = shuffleDriver.registerShuffle( ShuffleDescriptionImpl.newBuilder(MESSAGE_EXCHANGE_SHUFFLE_NAME) .setSenderIdList(senderIdList) .setReceiverIdList(receiverIdList) .setKeyCodecClass(IntegerCodec.class) .setValueCodecClass(IntegerCodec.class) .setShuffleStrategyClass(KeyShuffleStrategy.class) .build() ); this.shuffleManager.setPushShuffleListener( new SimplePushShuffleListener(shuffleManager, shutdown, numShutdownIterations)); }