boolean singlepartitioned = (partitions.size() == 1);
t_counters[singlepartitioned ? 0 : 1]++;
t_counters[2]++; // Total # of Txns
// Estimate Clusterer MarkovGraphCost
MarkovCostModel c_costmodel = state.costmodels_per_partition[base_partition.intValue()];
double c_cost = 0.0;
TxnToClusterMarkovGraphsContainer markovs = state.markovs_per_partition[base_partition.intValue()];
markovs.addTransactionClusterXref(txn_id, c);
MarkovGraph markov = markovs.get(c, catalog_proc);
// Check that this is a cluster that we've seen before at this partition
if (markov == null) {
if (trace.val) LOG.warn(String.format("Txn #%d was mapped to never before seen Cluster #%d at partition %d", txn_id, c, base_partition));
markov = markovs.getOrCreate(c, this.catalog_proc).initialize();
markovs.addTransactionClusterXref(txn_id, c);
// state.t_estimators_per_partition[base_partition.intValue()].processTransactionTrace(txn_trace);
c_counters[2]++; // Unknown Clusters
}
c_cost = c_costmodel.estimateTransactionCost(catalogContext, txn_trace);
if (c_cost > 0) {
total_c_cost += c_cost;
c_counters[singlepartitioned ? 0 : 1]++;
// So that we can improve our predictions...