// superstep mod availableWorkerInfos
// Guaranteed to be different if the workers (and their order)
// do not change
long workerIndex = superstep % availableWorkerInfos.size();
int i = 0;
WorkerInfo chosenWorkerInfo = null;
for (WorkerInfo workerInfo : availableWorkerInfos) {
if (workerIndex == i) {
chosenWorkerInfo = workerInfo;
}
++i;
}
if (LOG.isInfoEnabled()) {
LOG.info("generateChangedPartitionOwners: Chosen worker " +
"for superstep " + superstep + " is " +
chosenWorkerInfo);
}
List<PartitionOwner> partitionOwnerList = new ArrayList<PartitionOwner>();
for (PartitionOwner partitionOwner :
getCurrentPartitionOwners()) {
WorkerInfo prevWorkerinfo =
partitionOwner.getWorkerInfo().equals(chosenWorkerInfo) ?
null : partitionOwner.getWorkerInfo();
PartitionOwner tmpPartitionOwner =
new BasicPartitionOwner(partitionOwner.getPartitionId(),
chosenWorkerInfo,