SimpleName shuffleName = names.create("shuffle");
shuffleNames.put(segment, shuffleName);
Name shuffleTypeName = segment.getCompiled().getCombineOutputType().getQualifiedName();
fields.add(factory.newFieldDeclaration(
null,
new AttributeBuilder(factory)
.Private()
.toAttributes(),
importer.toType(shuffleTypeName),
shuffleName,
null));
}
// rendezvous
for (ReduceUnit unit : reduceUnits) {
if (unit.canCombine() == false) {
continue;
}
Fragment first = unit.getFragments().get(0);
SimpleName rendezvousName = names.create("combine");
rendezvousNames.put(first, rendezvousName);
fields.add(factory.newFieldDeclaration(
null,
new AttributeBuilder(factory)
.Private()
.toAttributes(),
importer.toType(first.getCompiled().getQualifiedName()),
rendezvousName,
null));