public Engine(FlowCompilingEnvironment environment, ShuffleModel model) {
   assert environment != null;
   assert model != null;
   this.model = model;
   this.factory = environment.getModelFactory();
   Name packageName = environment.getStagePackageName(model.getStageBlock().getStageNumber());
   this.importer =
       new ImportBuilder(
           factory,
           factory.newPackageDeclaration(packageName),
           ImportBuilder.Strategy.TOP_LEVEL);
 }
Пример #2
0
 Engine(FlowCompilingEnvironment environment, StageModel model) {
   assert environment != null;
   assert model != null;
   this.reduceUnits = model.getReduceUnits();
   this.shuffle = model.getShuffleModel();
   this.factory = environment.getModelFactory();
   Name packageName = environment.getStagePackageName(model.getStageBlock().getStageNumber());
   this.importer =
       new ImportBuilder(
           factory,
           factory.newPackageDeclaration(packageName),
           ImportBuilder.Strategy.TOP_LEVEL);
   this.names = new NameGenerator(factory);
   this.context = names.create("context");
   this.shuffleNames = Maps.create();
   this.rendezvousNames = Maps.create();
 }