private void compile(Fragment fragment, StageModel stage) throws IOException {
   if (fragment.isRendezvous()) {
     CompiledType compiled =
         new ReduceFragmentEmitter(environment)
             .emit(fragment, stage.getShuffleModel(), stage.getStageBlock());
     fragment.setCompiled(compiled);
   } else {
     CompiledType compiled =
         new MapFragmentEmitter(environment).emit(fragment, stage.getStageBlock());
     fragment.setCompiled(compiled);
   }
 }