protected void setUp() throws Exception {
super.setUp(ProjectType.SEATS);
this.initializeCatalog(NUM_HOSTS, NUM_SITES, NUM_PARTITIONS);
Procedure catalog_proc = this.getProcedure(TARGET_PREFETCH_PROCEDURE);
Statement catalog_stmt = this.getStatement(catalog_proc, TARGET_PREFETCH_STATEMENT);
catalog_stmt.setPrefetchable(true);
catalog_proc.setPrefetchable(true);
final ParameterSet params = new ParameterSet(this.proc_params);
final EstimatorState estState = new MarkovEstimatorState.Factory(catalogContext).makeObject();
estState.addPrefetchableStatement(new CountedStatement(catalog_stmt, 0));
// Hard-code ParameterMapping
int mappings[][] = {
// StmtParameter -> ProcParameter
{ 0, 1 },
};
List<ProcParameter> procParams = CatalogUtil.getSortedCatalogItems(catalog_proc.getParameters(), "index");
List<StmtParameter> stmtParams = CatalogUtil.getSortedCatalogItems(catalog_stmt.getParameters(), "index");
assertNotNull(stmtParams);
assertEquals(catalog_stmt.getParameters().size(), mappings.length);
for (int m[] : mappings) {
stmtParams.get(m[0]).setProcparameter(procParams.get(m[1]));
} // FOR
assertNotNull(catalogContext.paramMappings);