// instance and periodically recalculate the stats.
//
@SuppressWarnings("deprecation")
private void updateStats()
{
CounterStat temp;
temp = new CounterStat();
temp.merge(finishedInputDataSize);
for (TaskExecution taskExecution : tasks.values()) {
TaskContext taskContext = taskExecution.getTaskContext();
temp.merge(taskContext.getInputDataSize());
}
inputDataSize.resetTo(temp);
temp = new CounterStat();
temp.merge(finishedInputPositions);
for (TaskExecution taskExecution : tasks.values()) {
TaskContext taskContext = taskExecution.getTaskContext();
temp.merge(taskContext.getInputPositions());
}
inputPositions.resetTo(temp);
temp = new CounterStat();
temp.merge(finishedOutputDataSize);
for (TaskExecution taskExecution : tasks.values()) {
TaskContext taskContext = taskExecution.getTaskContext();
temp.merge(taskContext.getOutputDataSize());
}
outputDataSize.resetTo(temp);
temp = new CounterStat();
temp.merge(finishedOutputPositions);
for (TaskExecution taskExecution : tasks.values()) {
TaskContext taskContext = taskExecution.getTaskContext();
temp.merge(taskContext.getOutputPositions());
}
outputPositions.resetTo(temp);
}