logger.debug("Outcome of sender next {}", out);
switch(out){
case STOP:
case NONE:
for (int i = 0; i < tunnels.length; ++i) {
FragmentWritableBatch b2 = FragmentWritableBatch.getEmptyLast(handle.getQueryId(), handle.getMajorFragmentId(), handle.getMinorFragmentId(), config.getOppositeMajorFragmentId(), i);
stats.startWait();
try {
tunnels[i].sendRecordBatch(this.statusHandler, b2);
} finally {
stats.stopWait();
}
statusHandler.sendCount.increment();
}
return false;
case OK_NEW_SCHEMA:
case OK:
WritableBatch writableBatch = incoming.getWritableBatch();
if (tunnels.length > 1) {
writableBatch.retainBuffers(tunnels.length - 1);
}
for (int i = 0; i < tunnels.length; ++i) {
FragmentWritableBatch batch = new FragmentWritableBatch(false, handle.getQueryId(), handle.getMajorFragmentId(), handle.getMinorFragmentId(), config.getOppositeMajorFragmentId(), i, writableBatch);
updateStats(batch);
stats.startWait();
try {
tunnels[i].sendRecordBatch(this.statusHandler, batch);
} finally {