this.cachedTuples.swapInstances(); // do rollup
this.cachedTuples.datum(createCachedTuples(tupleMRConf));
}
private static CachedTuples createCachedTuples(TupleMRConfig config) {
SerializationInfo serInfo = config.getSerializationInfo();
boolean multipleSources = config.getNumIntermediateSchemas() >= 2;
CachedTuples r = new CachedTuples();
r.commonTuple = new Tuple(serInfo.getCommonSchema());
for(Schema sourceSchema : config.getIntermediateSchemas()) {
r.resultTuples.add(new Tuple(sourceSchema));
}
if(multipleSources) {
for(Schema specificSchema : serInfo.getSpecificSchemas()) {
r.specificTuples.add(new Tuple(specificSchema));
}
}
return r;
}