* Generate the txn input parameters for a new invocation.
* @param target
* @return
*/
protected Object[] generateParams(Transaction target) {
final CatalogContext catalogContext = this.getCatalogContext();
long acctIds[] = new long[]{ -1, -1 };
int partitions[] = new int[acctIds.length];
int sites[] = new int[acctIds.length];
boolean is_hotspot = (this.rand.nextInt(100) < this.prob_account_hotspot);
boolean is_dtxn = (this.rand.nextInt(100) < this.prob_multiaccount_dtxn);
boolean retry = false;
for (int i = 0; i < acctIds.length; i++) {
// Outside the hotspot
if (is_hotspot == false) {
acctIds[i] = this.rand.nextInt(this.numAccounts - this.hotspot_size) + this.hotspot_size;
}
// Inside the hotspot
else {
acctIds[i] = this.rand.nextInt(this.hotspot_size);
}
// They can never be the same!
if (i > 0 && acctIds[i-1] == acctIds[i]) {
continue;
}
partitions[i] = TheHashinator.hashToPartition(acctIds[i]);
sites[i] = catalogContext.getSiteIdForPartitionId(partitions[i]);
// If we only need one acctId, break out here.
if (i == 0 && target.needsTwoAccts == false) break;
// If we need two acctIds, then we need to go generate the second one
if (i == 0) continue;